Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.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
Ruby on rails 3 Heroku入门(非):找不到应用程序_Ruby On Rails 3_Heroku - Fatal编程技术网

Ruby on rails 3 Heroku入门(非):找不到应用程序

Ruby on rails 3 Heroku入门(非):找不到应用程序,ruby-on-rails-3,heroku,Ruby On Rails 3,Heroku,这应该很简单,我发誓一小时前它还在工作。我可以登录到Heroku,但无法运行任何有用的命令: $ heroku login Enter your Heroku credentials. Email: xxx@whatever.com Password: $ heroku stack App not found $ heroku config App not found 也许这就是问题的根源 $ git remote show heroku ! No such app as empty-sa

这应该很简单,我发誓一小时前它还在工作。我可以登录到Heroku,但无法运行任何有用的命令:

$ heroku login
Enter your Heroku credentials.
Email: xxx@whatever.com
Password: 
$ heroku stack
App not found
$ heroku config
App not found
也许这就是问题的根源

$ git remote show heroku
!  No such app as empty-samurai-345
fatal: The remote end hung up unexpectedly
empty-samuri-345是我之前删除的一个应用程序。我真正想做的就是使用竹磁共振-1.9.2堆栈上传一个新的应用程序


提前感谢您的建议…

您需要使用以下命令删除git中的heroku remote:

git remote rm heroku
然后,您可以使用此遥控器添加新的遥控器:

git remote add heroku git@heroku.com:your-app.git
然后尝试运行您的
heroku
命令。

运行以下命令

git config -l
config键很容易识别,
remote.heroku.url

现在,如果您愿意直接编辑配置,只需:

git config -e
如果没有:

# Confirm you've got the right key
git config remote.heroku.url
# Substitute your_app_name appropriately
git config remote.heroku.url git@heroku.com:your_app_name.git
我的回答是基于无所畏惧的傻瓜的评论,缺乏很多细节


仅供参考:配置文件位于/your_git_repo/.git/config

我刚刚从heroku online dashboard重命名我的应用程序时遇到了同样的问题。 然后我尝试在本地机器的cli中运行一些命令,结果显示“App not found”。我想Cli不知道我重命名应用程序的更改

因此,我再次登录heroku网站,并用旧名称重命名该应用程序。 然后,所有命令都可以从cli运行

因此,不要使用在线仪表板重命名应用程序,请使用CLI。


我希望它能帮助别人

漂亮--谢谢。我最终编辑了.git文件以删除heroku条目——这似乎也起到了作用。这里记录了这一点:我也遇到了同样的问题,因为我重命名了我的应用程序。我打开了
.git/config
并更改了Heroku repo URL,它解决了问题。我有类似的症状,结果发现问题是我登录了另一个Heroku帐户。编辑文件后,退出以退出插入模式,退出以保存和退出。而不是使用仪表板撤消名称更改,您应该改为编辑回购协议的
.git/config
(这样做的快捷方式是
git config-e
),并用新名称替换旧名称(即更改
url=git@heroku.com:old-name-1234.git
to
url=git@heroku.com:new-name-5678.git
)。请参见@derek litz的答案