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
如何在Heroku上启动Play 2.1应用程序_Heroku_Playframework 2.0 - Fatal编程技术网

如何在Heroku上启动Play 2.1应用程序

如何在Heroku上启动Play 2.1应用程序,heroku,playframework-2.0,Heroku,Playframework 2.0,我正在尝试在Heroku上启动Play 2.1应用程序,但我不知道如何在一个dyno上启动它。我正在尝试将“SecureSocial”中的“演示应用程序部署到Heroku。我使用IntelliJ IDEA Heroku插件将我的项目上传到Heroku。我正在使用建议的“Procfile”,但我不知道如何让Heroku启动dyno。它表现得好像它不会开始,我不知道如何解决它 我的Procfile(在我的项目根目录中)包含: web: target/start -Dhttp.port=$PORT -

我正在尝试在Heroku上启动Play 2.1应用程序,但我不知道如何在一个dyno上启动它。我正在尝试将“SecureSocial”中的“演示应用程序部署到Heroku。我使用IntelliJ IDEA Heroku插件将我的项目上传到Heroku。我正在使用建议的“Procfile”,但我不知道如何让Heroku启动dyno。它表现得好像它不会开始,我不知道如何解决它

我的Procfile(在我的项目根目录中)包含:

web: target/start -Dhttp.port=$PORT -DapplyEvolutions.default=true -Ddb.default.driver=
  org.postgresql.Driver -Ddb.default.url=$DATABASE_URL
也许我还没有把我的代码上传到Heroku,但我想我已经上传了?我怎么知道?Heroku似乎不允许我浏览代码

我的IntelliJ创意能够创建Heroku在线项目,因此我认为它没有理由不为我将代码推送到“Heroku master”。我现在遇到的一个问题是命令行git push失败:

C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>git remote -v
heroku  git@heroku.com:signup-sheet.git (fetch)
heroku  git@heroku.com:signup-sheet.git (push)
origin  https://github.com/djangofan/signup-sheet.git (fetch)
origin  https://github.com/djangofan/signup-sheet.git (push)

C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>heroku login
Enter your Heroku credentials.
Email: djangofan@gmail.com
Password (typing will be hidden):
Authentication successful.

C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>heroku create
Creating nameless-depths-2834... done, stack is cedar
http://nameless-depths-2834.herokuapp.com/ | git@heroku.com:nameless-depths-2834.git

C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>git push heroku master
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>heroku releases
=== signup-sheet Releases
v2  Enable Logplex   djangofan@gmail.com  2013/06/12 21:37:43 (~ 10h ago)
v1  Initial release  djangofan@gmail.com  2013/06/12 21:37:42 (~ 10h ago)
照此

Permission denied (publickey).
fatal: Could not read from remote repository.

这似乎是与Heroku git存储库关联的公钥的问题。这就是您想要的答案。

虽然您可以仅使用Heroku帐户创建Heroku应用程序,但在将公钥添加到Heroku之前,您无法部署任何代码。您可以使用Heroku toolbelt()和以下命令判断是否添加了密钥:

heroku keys
如果列出了多个密钥,或者不知道哪个密钥是正确的,可以清除所有密钥并添加您知道正确的密钥。如果只有一个键,则不需要指定它

heroku keys:clear
heroku keys:add /path/to/public/key/for/heroku.pub
如果您的密钥不是id_rsa.pub,那么您可能需要创建一个SSH配置文件来定义应该为Heroku使用哪个密钥

Host heroku.com
Hostname heroku.com
Port 22
IdentitiesOnly yes
IdentityFile ~/.ssh/heroku  # or what ever you called the public key
TCPKeepAlive yes
user name@email-address.com  # include the email address used for your heroku account
现在,您应该能够将代码推送到Heroku,从而创建一个“部署”版本,例如:

V6部署53u883u


谢谢

你可以通过查看你的应用程序仪表板的“活动”部分来判断你是否已将代码推送到Heroku:我在“活动”中有一个日志条目,上面写着“大约11小时前的首次发布”,另一个日志条目写着“启用logplex”。如果安装了toolbelt,也可以使用命令行,并使用:heroku检查是否有版本release@JR0cket-我用这些信息更新了我的问题。听起来好像你没有推送你的代码。或者,如果您这样做了,可能它失败了,因为您没有将您的公钥添加到heroku。检查IntelliJ日志,或者如果您有一个命令行git客户端(Heroku工具带的一部分),那么您可以通过执行以下操作查看是否存在错误:git push Heroku Master这看起来确实很有希望。我今晚会试试,然后再打给你。谢谢。我在回复Pere Villega的答案时提供的要点链接中已经有了这些信息。谢谢你。在本例中,我添加了该文件(在Windows上),尽管我不确定它的效果。我的问题导致了这场惨败,可能与我错误地将HOME var设置为Git HOME而不是我的用户HOME dir有关。