在Heroku上部署Play 2.0.2应用程序 [英] Deploy a Play 2.0.2 application on Heroku

查看:183
本文介绍了在Heroku上部署Play 2.0.2应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Heroku上部署一个全新的应用程序。它是使用Play制作的!框架2.0.2。



我遵循本页的所有步骤: https://github.com/playframework/Play20/wiki/ProductionHeroku



但是当我部署它时,出现以下错误

 
> -----> Heroku接收推送
----->播放! app检测到
----->警告:播放!版本未在dependencies.yml中指定。默认版本
:正在使用1.2.4 ....
----->安装Play! 1.2.4 .....
----->完成
----->安装ivysettings.xml .....完成
----->建立玩!应用程序...
〜_ _
〜_ __ | | __ _ _ _ | |
〜| '_ \ | | / _'| || | _ |
〜| __ / | _ | \ ____ | \__(_)
〜| _ | | __ /

〜玩! 1.2.4,http://www.playframework.org

1.2.4
玩游戏!应用程序目录./
解决依赖关系:.play / play依赖关系./ --forProd --forceCopy
--silent -Duser.home = / tmp / build_2g0tyg50mwz8m 2>&1
〜! ! /tmp/build_2g0tyg50mwz8m/conf/dependencies.yml不存在

〜完成!

预编译:.play / play预编译./ --silent 2>&1
〜糟糕。 conf / routes或conf / application.conf丢失。
〜/ tmp / build_2g0tyg50mwz8m似乎没有托管有效的应用程序。

!无法构建Play!申请
!清除播放!来自缓存
的框架! Heroku推拒绝,未能编译播放! app`

所以它要求我在dependencies.yml中定义版本。但是我怎么能这样做,如果在新版本的框架中没有这样的文件?我发现一个人说他通过将整个框架上传到Heroku来解决这个问题。但这对我来说似乎不合适。



任何想法如何解决这个问题?

非常感谢。

解决方案

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

您也可以尝试:

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

这将强制Heroku使用Play 2 buildpack 。


I'm trying to deploy a fresh new application on Heroku. It was made using Play! framework 2.0.2.

I followed all the steps of this page: https://github.com/playframework/Play20/wiki/ProductionHeroku

But when I deployed it, got the following error

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

So it is asking me to define the version at dependencies.yml. But how could I do that if in the new version of the framework there's no such file?

I found a guy who said he fixed this by uploading the entire framework to Heroku. But that just doesn't seem right to me.

Any ideas how I could fix this up?

Thanks very much.

解决方案

Make sure that your project is in the root directory of your git repo.

You can also try:

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

That will force Heroku to use the Play 2 buildpack.

这篇关于在Heroku上部署Play 2.0.2应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆