Ruby-on-rails 将应用程序推送到 heroku 问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2947190/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 22:43:31  来源:igfitidea点击:

Pushing app to heroku problem

ruby-on-railsrubyhostingheroku

提问by goddamnyouryan

I am trying to push my app to heroku and I get the following message:

我正在尝试将我的应用程序推送到 heroku 并收到以下消息:

$ heroku create
Creating electric-meadow-15..... done
Created http://electric-meadow-15.heroku.com/ | [email protected]:electric-meadow-1
5.git

$ git push heroku master

 !  No such app as fierce-fog-63

fatal: The remote end hung up unexpectedly

It's weird that I am getting this now, I have pushed the app to heroku many times without issue. the especially weird thing is, fierce-fog-63is an old app that I made and deleted a long time ago. Why is it now that heroku is trying to push to this app that doesn't exist anymore, especially when I have created a new one? Any suggestions?

我现在得到这个很奇怪,我已经多次将该应用程序推送到 heroku 没有问题。特别奇怪的是,这fierce-fog-63是一个我很久以前制作和删除的旧应用程序。为什么现在 heroku 试图推送到这个不再存在的应用程序,尤其是当我创建了一个新的应用程序时?有什么建议?

回答by Adam Wiggins

Type this and I think you'll see the problem:

输入这个,我想你会看到问题:

git remote -v

Fix it like this:

像这样修复它:

git remote rm heroku
git remote add heroku [email protected]:electric-meadow-15.git

回答by ajivani

I was getting the second error you posted "failed to push some refs to '[email protected]:floating-stone-94.git' " (with a different app name) and i got rid of it by doing the following:

我收到了您发布的第二个错误“无法将一些引用推送到 '[email protected]:floating-stone-94.git'”(使用不同的应用程序名称),我通过执行以下操作摆脱了它:

git remote rm heroku
heroku create

you should see a line that says 'Git remote heroku added'. Also

您应该会看到一行显示“添加了 Git 远程 heroku”。还

git remote -v

should now have the correct app.

现在应该有正确的应用程序。

回答by georgekorsnick

For all the people who this does not work, check your ~/.heroku/credentials
If the email or token does not match the account, you won't see your apps.

对于所有这不起作用的人,请检查您的~/.heroku/credentials
如果电子邮件或令牌与帐户不匹配,您将看不到您的应用程序。

回答by Bruiser

If you got here and think you have a similar problem but all of the other stuff suggested does not work you might want to try:

如果您来到这里并认为您有类似的问题,但建议的所有其他内容都不起作用,您可能想尝试:

heroku restart