在Heroku上部署Play 2.0.2应用程序

时间:2012-07-16 18:25:03

标签: heroku playframework-2.0

我正在尝试在Heroku上部署一个全新的应用程序。它是用Play制作的!框架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来解决这个问题。但这对我来说似乎不对。

我有什么想法可以解决这个问题吗?

非常感谢。

2 个答案:

答案 0 :(得分:2)

确保您的项目位于git仓库的根目录中。

您也可以尝试:

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

这将迫使Heroku使用Play 2 buildpack。

答案 1 :(得分:2)

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

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

相关问题