Reputation: 388
I deploy a Play 2.2.1 app on Heroku with this following Procfile :
web: target/universal/stage/bin/{MY-APP-NAME} -Dhttp.port=${PORT} -DapplyEvolutions.default=true
And I don't understand, I have always the same error :
bash: target/universal/stage/bin/{MY-APP-NAME}: No such file or directory
Here my heroku config :
JAVA_OPTS: -Xmx384m -Xss512k -XX:+UseCompressedOops
PATH: .jdk/bin:.sbt_home/bin:/usr/local/bin:/usr/bin:/bin
REPO: /app/.sbt_home/.ivy2/cache
SBT_OPTS: -Xmx384m -Xss512k -XX:+UseCompressedOops
I have no idea what to do, anyone have an idea please ?
Thanks for your response.
Upvotes: 3
Views: 1318
Reputation: 378
run: sbt clean stage
-to create target/universal/stage/bin/{MY-APP-NAME}
check build.sbt to make sure about your application name and modify it in Procfile
and ultimately git push ...
Upvotes: 2
Reputation: 1
As I had the same issue, I just wanted to share how I solved it.
So if you are using sub-projects like me, you have to adjust your Procfile. If you have a sub-project called server
in a folder server
, your Procfile should look like this :
web: server/target/universal/stage/bin/server -Dhttp.port=${PORT}
Upvotes: 0
Reputation: 12850
Replace {MY-APP-NAME}
with the name of your app. Eg, if your app is called foo
, then it should be:
web: target/universal/stage/bin/foo -Dhttp.port=${PORT} -DapplyEvolutions.default=true
The name of your app is declared in the build.sbt
file, eg:
name := "foo"
Upvotes: 3