2014-05-02 85 views
0

嘗試將我的Pl​​ay 2.2.2應用程序部署到Heroku時出現以下錯誤。無法將Play 2.2.2應用程序部署到Heroku

158-37-227-60:Bachelorprosjekt Magne$ heroku create --buildpack https://github.com/heroku/heroku-buildpack-scala.git 
Creating murmuring-scrubland-2494... done, stack is cedar 
BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-scala.git 
http://murmuring-scrubland-2494.herokuapp.com/ | [email protected]:murmuring-scrubland-2494.git 
158-37-227-60:Bachelorprosjekt Magne$ git push heroku master 
fatal: 'heroku' does not appear to be a git repository 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 
158-37-227-60:Bachelorprosjekt Magne$ git remote add heroku [email protected]:murmuring-scrubland-2494.git 
158-37-227-60:Bachelorprosjekt Magne$ git push heroku master 
Initializing repository, done. 
Counting objects: 627, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (254/254), done. 
Writing objects: 100% (627/627), 290.28 KiB | 166.00 KiB/s, done. 
Total 627 (delta 312), reused 573 (delta 286) 

-----> Fetching custom git buildpack... done 

!  Push rejected, no Cedar-supported app detected 

To [email protected]:murmuring-scrubland-2494.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:murmuring-scrubland-2494.git' 

我Procfile看起來是這樣的:

web: target/universal/stage/bin/Bachelorprosjekt -Dhttp.port=$PORT 

我一直在到處尋找一個解決這一點,但類似的問題的解決方案並沒有幫助我至今:S

更新:當我嘗試部署時未指定構建包時,Heroku嘗試將其部署爲Play 1.2.7應用程序,而不是實際的Play 2.2.2應用程序。很顯然,每次部署都會失敗。這是我得到的輸出:

-----> Play! app detected 
-----> Installing OpenJDK 1.6...done 
-----> WARNING: Play! version not specified in dependencies.yml. Default version: 1.2.7 being used.... 
-----> Installing Play! 1.2.7..... 
-----> done 
-----> Installing ivysettings.xml..... done 
-----> Building Play! application... 
     ~  _   _ 
     ~ _ __ | | __ _ _ _| | 
     ~ | '_ \| |/ _' | || |_| 
     ~ | __/|_|\____|\__ (_) 
     ~ |_|   |__/ 
     ~ 
     ~ play! 1.2.7, http://www.playframework.org 
     ~ 
     1.2.7 
     Building Play! application at directory ./ 
     Resolving dependencies: .play/play dependencies ./ --forProd --forceCopy --silent -Duser.home=/tmp/build_addb406e-ac10-446c-bec7-3e6c14ad98e8 2>&1 
     ~ !! /tmp/build_addb406e-ac10-446c-bec7-3e6c14ad98e8/conf/dependencies.yml does not exist 
!  Failed to build Play! application 
!  Cleared Play! framework from cache 

!  Push rejected, failed to compile Play! app 

To [email protected]:praksisreg.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:praksisreg.git' 
+0

它沒有構建包的工作...做一個「玩新」,然後混帳推。 –

+0

我之所以添加構建包,是因爲Heroku一直試圖將其部署爲Play 1.2.7應用,而實際上它是一款Play 2.2.2應用。我試圖強制它將它部署爲2.2.2。 – msk

回答

0

已解決。 Heroku無法使用當前項目結構部署我的項目時出現問題。我的項目位於另一個文件夾內,必須位於Heroku的根級才能成功部署應用程序。

+0

是的,我最不喜歡的Heroku功能之一。 – IanRae

1

作爲stated由heroku本身,它是不可能在子文件夾中的項目。

但是,你可以使用git subtree參數將子文件夾推送到herokus根目錄。

git subtree push --prefix subfoldername heroku master

有關更多信息,請參見本Link