Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Deployment Can';t将Play应用程序部署到Heroku中_Deployment_Heroku_Playframework - Fatal编程技术网

Deployment Can';t将Play应用程序部署到Heroku中

Deployment Can';t将Play应用程序部署到Heroku中,deployment,heroku,playframework,Deployment,Heroku,Playframework,我在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

我在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 git@heroku.com:billeteo.git
   53b789c..24f66a4  master -> master
当然,它不包含代码,因此进程失败

我的应用程序是具有以下dependencies.xml的标准Play app:

# 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上找不到任何东西…

Heroku上的播放设置没有预料到您在这里的特定设置。正如您所指出的,它混淆了应用程序的根在哪里。我认为我们可以推动修复来解决这个问题,但与此同时,您应该能够解决它。试试这个:

压缩自定义模块并将dependencies.yml文件更改为

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

在依赖项解析过程中,Play应该解压自定义模块并将它们放在正确的位置。此外,Heroku不应该对你的应用程序的根目录感到困惑。

谢谢你的回答。现在我得到另一个错误:20:55:58442错误~预编译类丢失!!有什么想法吗?顺便说一句,Heroku刚刚通过检查某某并在这里回答得到了++爱;)很难知道预编译到底发生了什么。你能给Heroku写张票让我看看你的应用程序吗?我一定会重新发布我们发现的任何东西:)事实上,在您记录票据之前,您可以尝试像Heroku那样运行编译。真的没有魔法:布拉格。太早按回车键。查看这篇文章,了解如何复制Heroku编译:
...
repositories:
 - localModules:
     type:       local
     artifact:   "${application.path}/mods/[organisation]/[module]-[revision].zip"
     contains:
       - playcopy
       - custom
...