Scala Play 2.2 application crashes after deploying in Heroku: target/start No such file or directory

前端 未结 3 770
难免孤独
难免孤独 2021-01-11 18:32

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-30         


        
相关标签:
3条回答
  • 2021-01-11 18:57

    I solved it as follows (possibly already answered but here are my steps)

    $ heroku local web
    

    Got the following output in the console

    forego | starting web.1 on port 5000
    web.1  | /bin/bash: target/bin/Service: Permission denied
    

    Then I did

    $chmod 777 target/bin/Service
    

    and problem resolved.

    Here, Service is the name of my application (as specified in pom.xml org.codehaus.mojo plugin) and here is what my Procfile file content looks like

    web: target/bin/Service -Dhttp.port=${PORT} ${JAVA_OPTS} -DapplyEvolutions.default=true -Ddb.default.driver=org.postgresql.Driver -Ddb.default.url=${DATABASE_URL}
    
    0 讨论(0)
  • 2021-01-11 19:00

    See Deploy to Heroku, especially Connecting to a database section.

    0 讨论(0)
  • 2021-01-11 19:05

    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

    For example, to start an application of the project ‘foo’ from the project folder, update your Procfile to run:

    target/universal/stage/bin/foo
    
    0 讨论(0)
提交回复
热议问题