部署在Heroku上一个播放2.0.2应用(Deploy a Play 2.0.2 applicat

2019-09-19 14:10发布

我试图部署在Heroku上一个全新的应用程序。 它是用做游戏! 框架2.0.2。

我跟着这个页面的所有步骤: https://github.com/playframework/Play20/wiki/ProductionHeroku

但是,当我部署它,得到了以下错误

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

因此,它要求我在dependencies.yml定义版本。 但是,我怎么能做到这一点,如果在该框架的新版本有没有这样的文件?

我发现一个人谁表示,他将其上传到Heroku的整个框架固定这一点。 但是,这只是似乎没有我的权利。

任何想法我怎么能解决这个问题吗?

非常感谢。

Answer 1:

这是在默认buildpack的错误。 我记录在这里的一个问题https://github.com/heroku/heroku-buildpack-play/issues/17

暂时,詹姆斯的解决方案是一个很好的解决方法。



Answer 2:

请确保您的项目是在你的git回购的根目录。

您也可以尝试:

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

这将迫使Heroku的使用播放2 buildpack。



文章来源: Deploy a Play 2.0.2 application on Heroku