2011-09-27 81 views
4

我在Heroku中部署Play應用程序時遇到問題。我已經沒有問題,部署不含模塊等基本應用,但是這一次是給我下面的錯誤:無法在Heroku中部署Play應用程序

@ubuntu:~/$ git push heroku master 
Counting objects: 812, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (699/699), done. 
Writing objects: 100% (794/794), 2.00 MiB, done. 
Total 794 (delta 145), reused 0 (delta 0) 

-----> Heroku receiving push 
-----> Play! app detected 
-----> Installing ivysettings.xml..... done 
-----> Building Play! application... 
     ~  _   _ 
     ~ _ __ | | __ _ _ _| | 
     ~ | '_ \| |/ _' | || |_| 
     ~ | __/|_|\____|\__ (_) 
     ~ |_|   |__/ 
     ~ 
     ~ play! 1.2.3, http://www.playframework.org 
     ~ 
     1.2.3 
     Play! application root found at ./mods/playcopy/crud-1.2.3/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/use-gs-in-tags/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/demo/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/inline-dependency-declaring/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/jquery-ui/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/booking/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/less-and-coffee/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/chat/ 
./mods/playcopy/greenscript-1.2.6h/ 
./ 
     Resolving dependencies: .play/play dependencies ./mods/playcopy/crud-1.2.3/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/use-gs-in-tags/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/demo/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/inline-dependency-declaring/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/jquery-ui/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/booking/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/less-and-coffee/ 
./mods/playcopy/greenscript-1.2.6h/samples-and-tests/chat/ 
./mods/playcopy/greenscript-1.2.6h/ 
./ --forceCopy --silent -Duser.home=/tmp/build_1hn7e8ahaqrso 2>&1 
     ~ Resolving dependencies using /tmp/build_1hn7e8ahaqrso/mods/playcopy/crud-1.2.3/conf/dependencies.yml, 
     ~ 
     ~ 
     ~ No dependencies to install 
      ~ 
     ~ Done! 
     ~ 
     ~  _   _ 
     ~ _ __ | | __ _ _ _| | 
     ~ | '_ \| |/ _' | || |_| 
     ~ | __/|_|\____|\__ (_) 
     ~ |_|   |__/ 
     ~ 
     ~ play! 1.2.3, http://www.playframework.org 
     ~ 
/app/slug-compiler/lib/../language_packs/play/bin/compile: line 64: ./mods/playcopy/greenscript-1.2.6h/samples-and-tests/use-gs-in-tags/: is a directory 
/app/slug-compiler/lib/../language_packs/play/bin/compile: line 65: ./mods/playcopy/greenscript-1.2.6h/samples-and-tests/demo/: is a directory 
/app/slug-compiler/lib/../language_packs/play/bin/compile: line 66: ./mods/playcopy/greenscript-1.2.6h/samples-and-tests/inline-dependency-declaring/: is a directory 
/app/slug-compiler/lib/../language_packs/play/bin/compile: line 67: ./mods/playcopy/greenscript-1.2.6h/samples-and-tests/jquery-ui/: is a directory 
/app/slug-compiler/lib/../language_packs/play/bin/compile: line 68: ./mods/playcopy/greenscript-1.2.6h/samples-and-tests/booking/: is a directory 
/app/slug-compiler/lib/../language_packs/play/bin/compile: line 69: ./mods/playcopy/greenscript-1.2.6h/samples-and-tests/less-and-coffee/: is a directory 
/app/slug-compiler/lib/../language_packs/play/bin/compile: line 70: ./mods/playcopy/greenscript-1.2.6h/samples-and-tests/chat/: is a directory 
/app/slug-compiler/lib/../language_packs/play/bin/compile: line 71: ./mods/playcopy/greenscript-1.2.6h/: is a directory 
     /app/slug-compiler/lib/../language_packs/play/bin/compile: line 72: ./: is a directory 
!  Failed to build Play! application 
!  Cleared Play! framework from cache 
/app/slug-compiler/lib/language_pack.rb:35:in `block in compile': failed to compile Play! app (Slug::CompileError) 
    from /app/slug-compiler/lib/language_pack.rb:32:in `fork' 
    from /app/slug-compiler/lib/language_pack.rb:32:in `compile' 
    from /app/slug-compiler/lib/slug.rb:490:in `block in run_language_pack' 
    from /app/slug-compiler/lib/utils.rb:117:in `log' 
    from /app/slug-compiler/lib/slug.rb:727:in `log' 
    from /app/slug-compiler/lib/slug.rb:489:in `run_language_pack' 
    from /app/slug-compiler/lib/slug.rb:110:in `block (2 levels) in compile' 
    from /app/slug-compiler/lib/utils.rb:98:in `block in timeout' 
    from /usr/local/lib/ruby/1.9.1/timeout.rb:57:in `timeout' 
    from /app/slug-compiler/lib/utils.rb:98:in `rescue in timeout' 
    from /app/slug-compiler/lib/utils.rb:93:in `timeout' 
    from /app/slug-compiler/lib/slug.rb:99:in `block in compile' 
    from /app/slug-compiler/lib/utils.rb:117:in `log' 
    from /app/slug-compiler/lib/slug.rb:727:in `log' 
    from /app/slug-compiler/lib/slug.rb:98:in `compile' 
    from /app/slug-compiler/bin/slugc:85:in `block in <main>' 
    from /app/slug-compiler/lib/slug.rb:498:in `block in lock' 
    from /app/slug-compiler/lib/repo_lock.rb:44:in `call' 
    from /app/slug-compiler/lib/repo_lock.rb:44:in `run' 
    from /app/slug-compiler/lib/slug.rb:498:in `lock' 
    from /app/slug-compiler/bin/slugc:66:in `<main>' 
-----> Discovering process types 
     Procfile declares types -> web 
-----> Compiled slug size is 36.4MB 
-----> Launching... done, v6 
     http://billeteo.herokuapp.com deployed to Heroku 

To [email protected]:billeteo.git 
    53b789c..24f66a4 master -> master 

雖然我是從我的項目的根目錄運行,Heroku的認爲,我的根在:

Play! application root found at ./mods/playcopy/crud-1.2.3/ 

哪個,當然,不包含代碼和過程失敗。

我的應用程序是一個具有以下dependencies.xml標準Play應用程式:

# Application dependencies 
# Notes: 
# play is an alias for play -> play $currentVersion 
# play -> crud is an alias for play -> crud $currentVersion 
# play -> secure is an alias for play -> secure $currentVersion 
# Modules from the main repository use 'play' as organisation 

require: 
    - play 
    - playcopy -> crud 1.2.3 
    - playcopy -> betterlogs 1.0 
    - playcopy -> cobertura 2.1 
    - playcopy -> mockito 0.1 
    - playcopy -> greenscript 1.2.6h 
    - custom -> useragentcheck 1.0 
    - org.hibernate -> hibernate-search 3.4.0.Final 

repositories: 
    - localModules: 
     type:  local 
     artifact: "${application.path}/mods/[organisation]/[module]-[revision]" 
     contains: 
      - playcopy 
      - custom 

我使用了一些官方播放模塊的本地存儲庫,因爲他們可能有一些自定義代碼(去掉一些不必要的課程,變化安全,一些日誌等)。

任何人都知道如何讓Heroku找到正確的根?在Google上找不到任何東西...

回答

4

Heroku上的Play安裝程序沒有預料到您在此處的特定設置。就像你指出的那樣,它對你的應用程序的根源在哪裏感到困惑。我認爲我們可以解決這個問題,但同時你應該能夠解決這個問題。試試這個:

郵編您的自定義模塊,並改變你的dependencies.yml文件

... 
repositories: 
- localModules: 
    type:  local 
    artifact: "${application.path}/mods/[organisation]/[module]-[revision].zip" 
    contains: 
     - playcopy 
     - custom 
... 

在解決依賴,播放應該解壓您的自定義模塊,並把它們在正確的地方。另外,Heroku不應該對你的應用的根源在哪裏感到困惑。

+0

現在試試,謝謝! –

+0

感謝您的回答。現在我收到另一個錯誤: 20:55:58,442錯誤〜預編譯的類丟失了! 有什麼想法?順便說一句,Heroku剛剛得到了++的愛,通過檢查SO並在這裏回答;) –

+0

與預編譯完全不知道發生了什麼。您能否登錄Heroku的門票,以便查看您的應用程序?我一定會重新發布我們發現的任何東西:) – timkral

相關問題