3
votes

I'm trying to deploy a fresh new application on Heroku. It was made using Play! framework 2.0.2.

I followed all the steps of this page: https://github.com/playframework/Play20/wiki/ProductionHeroku

But when I deployed it, got the following error

>   -----> Heroku receiving push
    -----> Play! app detected
    -----> WARNING: Play! version not specified in dependencies.yml. Default versio
    : 1.2.4 being used....
    -----> Installing Play! 1.2.4.....
    -----> done
    -----> Installing ivysettings.xml..... done
    -----> Building Play! application...
           ~        _            _
           ~  _ __ | | __ _ _  _| |
           ~ | '_ \| |/ _' | || |_|
           ~ |  __/|_|\____|\__ (_)
           ~ |_|            |__/
           ~
           ~ play! 1.2.4, http://www.playframework.org
           ~
           1.2.4
           Building Play! application at directory ./
           Resolving dependencies: .play/play dependencies ./ --forProd --forceCopy
    --silent -Duser.home=/tmp/build_2g0tyg50mwz8m 2>&1
           ~ !! /tmp/build_2g0tyg50mwz8m/conf/dependencies.yml does not exist
           ~
           ~ Done!
           ~
           Precompiling: .play/play precompile ./ --silent 2>&1
           ~ Oops. conf/routes or conf/application.conf missing.
           ~ /tmp/build_2g0tyg50mwz8m does not seem to host a valid application.
           ~
     !     Failed to build Play! application
     !     Cleared Play! framework from cache
     !     Heroku push rejected, failed to compile Play! app`

So it is asking me to define the version at dependencies.yml. But how could I do that if in the new version of the framework there's no such file?

I found a guy who said he fixed this by uploading the entire framework to Heroku. But that just doesn't seem right to me.

Any ideas how I could fix this up?

Thanks very much.

2
It's strange because Heroku detects that your app is built with Play version 1.2.4. Is it a new instance of Heroku or an old one ? Can you show your Procfile ?ndeverge
It's a new instance of Heroku. The 1.2.4 is its default version, unfortunately. Here is my Procfile "web: target/start -Dhttp.port=${PORT} ${JAVA_OPTS}"Andre Rosot
If my answer below doesn't work then make sure your project is in the root directory of your git repo.James Ward
Just like you said. After I moved the project to the root of git repo it worked. Thanks a lot!Andre Rosot
Cool. Glad that worked. I've updated my answer to reflect this.James Ward

2 Answers

2
votes

This is a bug in the default buildpack. I logged an issue here https://github.com/heroku/heroku-buildpack-play/issues/17

For the time being, James' solution is a good workaround.

2
votes

Make sure that your project is in the root directory of your git repo.

You can also try:

heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-scala.git

That will force Heroku to use the Play 2 buildpack.