问题
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.
回答1:
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:
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.
来源:https://stackoverflow.com/questions/11510256/deploy-a-play-2-0-2-application-on-heroku