我有一个播放1.2.5应用程序,并希望将其部署到某个地方(所以我可以为一些OAuth回调注册它)。我想把它推到heroku但我得到以下错误
-----> Play! app detected
-----> Installing OpenJDK 1.6...done
-----> WARNING: Play! version not specified in dependencies.yml. Default version: 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_ev7rk9y0hage 2>&1
~ !! /tmp/build_ev7rk9y0hage/conf/dependencies.yml does not exist
~
~ Done!
~
Precompiling: .play/play precompile ./ --silent 2>&1
~ Oops. conf/routes or conf/application.conf missing.
~ /tmp/build_ev7rk9y0hage does not seem to host a valid application.
~
! Failed to build Play! application
! Cleared Play! framework from cache
! Push rejected, failed to compile Play! app
我一直关注此指南: https://devcenter.heroku.com/articles/play 更具体一点;
heroku login
web: play run --http.port=$PORT $PLAY_OPTS
的Procfile
heroku create
git push heroku master
我不知道如何修复此问题,stackoverflow和googlegroups(以及其他一些来源)都无法提供帮助。
答案 0 :(得分:1)
所以我解决了这个问题,问题是我们已经使用git并且存储库已在play项目parent/projRoot/
的父文件夹中初始化,所以我猜heroku正在寻找错误位置的文件并且因此无法建立。使用在projRoot/
中初始化的新git仓库,一切正常。
<强>更新强> 要从子文件夹部署播放应用程序,我找到了以下解决方案:
Deploy Play app on Heroku from a subdirectory of git repo
https://groups.google.com/forum/?fromgroups#!topic/play-framework/Gk9nfNSUzQs