1
votes

I have written a basic website as an example on play! 2 framework. I followed the instructions for deployment namely creating login, keys, git repository etc. When i issue the command

 git push heroku master

I get following error:

 git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.156' to the list of known hosts.
Enter passphrase for key '/home/nimish/.ssh/id_rsa': 
Initializing repository, done.
Counting objects: 57, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (42/42), done.
Writing objects: 100% (57/57), 41.02 KiB, done.
Total 57 (delta 8), reused 0 (delta 0)

-----> Play! app detected
-----> Installing OpenJDK 1.6...done
-----> WARNING: Play! version not specified in dependencies.yml. Default version: 1.2.7 being used....
-----> Installing Play! 1.2.7.....
-----> done
-----> Installing ivysettings.xml..... done
-----> Building Play! application...
       ~        _            _ 
       ~  _ __ | | __ _ _  _| |
       ~ | '_ \| |/ _' | || |_|
       ~ |  __/|_|\____|\__ (_)
       ~ |_|            |__/   
       ~
       ~ play! 1.2.7, http://www.playframework.org
       ~
       1.2.7
       Building Play! application at directory ./
       Resolving dependencies: .play/play dependencies ./ --forProd --forceCopy --silent -Duser.home=/tmp/build_653a40ef-01d5-46fa-9c7f-67f2b3e7a591 2>&1
       ~ !! /tmp/build_653a40ef-01d5-46fa-9c7f-67f2b3e7a591/conf/dependencies.yml does not exist
 !     Failed to build Play! application
 !     Cleared Play! framework from cache

 !     Push rejected, failed to compile Play! app

To [email protected]:radiant-tor-3278.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:radiant-tor-3278.git'

Why is it detecting an old play version when i am working on play 2. Here is my plugins.sbt --

/ Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

//Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")
2
Can you include your build.sbt? Also, this might be helpful - stackoverflow.com/questions/12369967/…Ilya I
And Play 2.x does not use dependencies.yml. Maybe you're using some stuff from 1.x version?Ilya I

2 Answers

1
votes

If you are using Play Framework 2.x then remove the conf/dependencies.yml file, commit, and re-push. If you are using Play 1.x then follow the instructions for Play 1.x at: https://devcenter.heroku.com/articles/play-support

0
votes

The solution by James Ward from this link worked -- Deploy a Play 2.0.2 application on Heroku My repo ws not at git root which was causing the main problem. Changed the heroku config as well.