Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/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
Can';t将Play 2.2.2应用程序部署到Heroku_Heroku_Playframework_Playframework 2.2 - Fatal编程技术网

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

Can';t将Play 2.2.2应用程序部署到Heroku,heroku,playframework,playframework-2.2,Heroku,Playframework,Playframework 2.2,在尝试将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/he

在尝试将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/ | git@heroku.com: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 git@heroku.com: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 git@heroku.com:murmuring-scrubland-2494.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:murmuring-scrubland-2494.git'
我的proc文件如下所示:

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 git@heroku.com:praksisreg.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:praksisreg.git'

解决了。出现了一个问题,Heroku无法使用当前项目结构部署我的项目。我的项目位于另一个文件夹中,并且必须位于根级别,Heroku才能成功部署该应用程序

正如heroku本身一样,子文件夹中不可能有项目

但是您可以使用git subtree参数将子文件夹推送到herokus根上

git子树推送——前缀子文件夹名heroku master


有关更多信息,请参阅此项。

它在没有生成包的情况下工作。。。我之所以添加构建包,是因为Heroku一直试图将其部署为play 1.2.7应用程序,而实际上它是play 2.2.2应用程序。我试图强迫它将其部署为2.2.2。是的,这是我最不喜欢的Heroku特性之一。