Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/53.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 Heroku推动生产_Ruby On Rails_Ruby On Rails 3_Git_Heroku_Production Environment - Fatal编程技术网

Ruby on rails Heroku推动生产

Ruby on rails Heroku推动生产,ruby-on-rails,ruby-on-rails-3,git,heroku,production-environment,Ruby On Rails,Ruby On Rails 3,Git,Heroku,Production Environment,我在heroku上设置了我的登台和生产环境,并将其推到这两个位置,效果很好。一天后我回来了,能够推送到staging,但得到了以下关于git push production master的消息: fatal: 'production' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access r

我在heroku上设置了我的登台和生产环境,并将其推到这两个位置,效果很好。一天后我回来了,能够推送到staging,但得到了以下关于git push production master的消息:

fatal: 'production' 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.

要确认每个远程设备指向的位置,请登录Heroku并打开应用程序的设置,然后将应用程序的git URL与git remote-v所显示的URL相匹配。然后,如有必要,为生产添加一个遥控器(即heroku)。

检查您的
历史记录,确保这实际上是您以前使用的命令。该错误表明您不在正确的文件夹中,或者以这种方式使用
production
会导致git认为您将
production
称为存储库或git远程分支,而这些名称都不存在。换句话说,您可能有一个相对容易发现的简单打字错误。尝试运行
git remote-v
,它将列出您的所有远程别名及其各自的URL。@Normalcity谢谢,但我非常确定这是确切的命令,我写下来供参考;但是我在历史上找不到它。。在哪里可以找到它的名称?有没有我可以运行的命令?或者我可以在heroku的web gui中找到它?@mmichael嗨,谢谢,我试过了,但是我没有看到prodcution env!我只看到了staging、github和git——我相信这和staging是一样的?也许不是?并且生产设置为heroku
,而暂存是分开的吗?我原以为defauls是在登台,但现在似乎不是这样了?查看存储库本地副本中的
.git/config
文件-是否有名为
production
的远程引用?标准的push-to-heroku是:
git-push-heroku[分支名称]
因此,如果要用
production
替换
heroku
,那么
.git/config
文件中应该有一个等价的条目。