Scala播放2.2应用程序在Heroku部署后崩溃:target / start没有这样的文件或目录 [英] Scala Play 2.2 application crashes after deploying in Heroku: target/start No such file or directory
问题描述
我已经和这几个小时的战斗了,我无法弄清楚为什么在Heroku部署我的Scala Play 2.2应用程序后,我得到这个堆栈跟踪:
I've been fighting with this for hours and I can't figure out why after deploying my Scala Play 2.2 application in Heroku I get this stacktrace:
2013-09-30T01:05:09.413177+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=18174 $PLAY_OPTS`
2013-09-30T01:05:10.931893+00:00 app[web.1]: bash: target/start: No such file or directory
2013-09-30T01:05:12.382399+00:00 heroku[web.1]: Process exited with status 127
2013-09-30T01:05:12.414050+00:00 heroku[web.1]: State changed from starting to crashed
我尝试过几个 Procfile 版本,没有成功,有些例子是:
I've tried several Procfile versions with no success, some examples are:
web: target/start -Dhttp.port=$PORT
web: target/start -Dhttp.port=$PORT $PLAY_OPTS
web: target/start -Dhttp.port=$PORT $JAVA_OPTS
web: target/start Web -Dhttp.port=$PORT $PLAY_OPTS
web: target/start -Dhttp.port=$PORT $PLAY_OPTS -Dconfig.file=application.conf
web: target/start -Dhttp.port=$PORT $PLAY_OPTS -Dconfig.file=conf/application.conf
我甚至尝试使用没有Procfile。
I even tried using no Procfile.
我正在使用Scala 2.10.2和Play 2.2。在同样的Heroku应用程序中,我有一个在Play 2.0上运行的项目的以前版本,我不知道是否相关。
I'm using Scala 2.10.2 and Play 2.2. In the same Heroku application I had a previous version of my project running on Play 2.0, I don't know if that is related.
该应用程序在本地工作完美。我连接到Heroku的bash,并运行
The application works perfect locally. I connected to the bash in Heroku and run
sbt clean
sbt stage
手动检查目标是否被清理并重建。
by hand and I checked that the target gets cleaned and built again.
什么目标/开始:没有这样的文件或目录是指?到目标?到开始命令?
What does the "target/start: No such file or directory" refer to? To the target? To the start command? To something else?
推荐答案
Play 2.2更改了用于启动应用的文件的名称和位置
Play 2.2 changed the name and location of the file used to start your app
http://www.playframework.com/documentation/ 2.2.x / Production
例如,要从项目文件夹启动项目foo的应用程序,请更新您的Procfile以运行: p>
For example, to start an application of the project ‘foo’ from the project folder, update your Procfile to run:
target/universal/stage/bin/foo
这篇关于Scala播放2.2应用程序在Heroku部署后崩溃:target / start没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!