成熟应用中Heroku拒绝推送(pre-receive hook拒绝)



我得到

   FAILED: http://devcenter.heroku.com/articles/bundler

!Heroku push被拒绝,通过Bundler安装gems失败到git@heroku.com:…! [remote rejected] master -> master (pre-receive hook被拒绝)错误:未能将一些参考推到..............(见底部的完整清单)

这是一个正在heroku上工作的应用程序,但是heroku不允许git push heroku master来更新代码。

但是,如果我将代码克隆到一个新文件夹中,并使用heroku create创建一个带有种子数据的新应用程序,则新应用程序可以正常工作。但是,我不想使用新的应用程序,因为我有关于我想要保存的功能应用程序的数据。

似乎现有的应用程序或宝石上有什么东西拒绝更新。我不认为数据可以阻止gems的安装,所以我不知道该怎么做。

建议吗?

"Heroku push rejected, failed to install gems through Bundler"意味着问题是在更新gem,还是这是一个转移注意力的问题?

谢谢。

$ git push heroku master计数对象:536,完成。增量压缩使用最多2个线程。压缩对象:100%(125/125),完成写入对象:100% (391/391),1.08 MiB,完成。总共391 (delta 262),重用373 (delta 251)

-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
       Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
       Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       Windows Gemfile.lock detected, ignoring it.
       You have modified your Gemfile in development but did not check
       the resulting snapshot (Gemfile.lock) into version control
   You have added to the Gemfile:
   * source: rubygems repository http://rubygems.org/
   * rails (= 3.0.5)
   * haml
   * haml-rails
   * sqlite3-ruby
   * devise (= 1.1.5)
   * omniauth
   * declarative_authorization
   * will_paginate (= 3.0.pre2)
   * nifty-generators
   * acts-as-taggable-on
   * acts_as_commentable
   * aws-s3
   * jquery-rails
   * rspec-rails
   * annotate
   * faker (= 0.3.1)
   * hpricot (= 0.8.3)
   * ruby_parser
   * paperclip (~> 2.3)
   * formtastic (~> 1.2.3)
   * hirb
   * kaminari
   * rspec (= 2.5.0)
   * webrat
   * factory_girl_rails (= 1.0)
   * cucumber
   * mocha
   FAILED: http://devcenter.heroku.com/articles/bundler

!Heroku push被拒绝,通过Bundler安装gems失败

git@heroku.com:……! [remote rejected] master -> master (pre-receive hook被拒绝)错误:无法推动一些参考文献 ..............

You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control

这意味着你已经添加了gems到你的gemfile,但还没有更新到。Gemfile。锁与文件不同步。

你需要更新你的bundle。

在应用程序的控制台中运行这个命令:bundle

然后做git push heroku

你应该可以走了。

**取消应用程序,重新开始。

gem install taps #install taps
heroku db:pull   #pull your data to your local machine
rm -rf .git #remove your git repo 
git init    #create a new repo
git add .   #add all the files
git commit -m 'master' #commit as master
heroku create #create a new heroku app
heroku rename myapp #rename the app
git push heroku master #push to heroku
heroku db:push #push your data to heroku

这应该会启动一个新的应用

我刚刚遇到了同样的问题,下面为我修复了它:

我有一个按需求分组的宝石组合(测试、开发等),还有一些被两者都使用,例如

group :development do
  gem "hpricot"
  gem "ruby_parser"
  gem "haml-rails", ">= 0.3.4"
end

gem "rspec-rails", ">= 2.9.0.rc2", :group => [:development, :test]

我删除了单行的,只是在相关块中复制它们(我知道不是DRY,但管他呢)。

做了一个快速的Bundle,然后我可以再次推送到Heroku…

据我所知,这是一个windows问题。

为什么Heroku不接受我的Gemfile ?锁住视窗?

我花了好几个小时想弄清楚这件事,但一无所获。是时候转移到虚拟机并在那里进行尝试了。游手好闲的人。

我得到了同样的错误,并在命令行中运行以下代码解决了它:

$ heroku config:set BUNDLE_WITHOUT="development:test"


我想是gemfile。以上提到的锁问题是转移注意力的问题。

或者,可能是Heroku有API问题而关闭。检查https://status.heroku.com/

我今天在使用一个成熟的应用程序时遇到了这种情况。

相关内容