Heroku 拒绝成熟应用程序中的推送(预接收挂钩被拒绝)
我明白了
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku 推送被拒绝,无法通过 Bundler 安装 gem 至[电子邮件受保护]:... ! [远程拒绝]master->主控(预接收挂钩拒绝) 错误:无法将一些参考推送到………….. (完整列表见底部)
这是一个当前在heroku上运行的应用程序,但heroku不允许 git push heroku master 更新代码。
但是,如果我将代码克隆到新文件夹并执行 heroku create 来创建带有种子数据的新应用程序,则新应用程序可以正常工作。但是,我不想使用新应用程序,因为我想保留有关正在运行的应用程序的数据。
现有的应用程序或 gems 上似乎有一些东西拒绝更新。我不认为数据可以阻止宝石的安装,所以我不知道该怎么办。
建议?
“Heroku 推送被拒绝,无法通过 Bundler 安装 gem”是否意味着问题出在更新 gem,或者这是一个转移注意力的问题?
谢谢。
$ git push heroku master 数物体:536,完成。 增量压缩最多使用 2 个线程。 压缩对象:100% (125/125),完成。 写入对象:100% (391/391),1.08 MiB,完成。 总计 391 个(增量 262 个),重复使用 373 个(增量 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 推送被拒绝,无法通过 Bundler 安装 gem
到[电子邮件受保护]: ... ! [远程拒绝]master-> master(预接收挂钩拒绝) 错误:无法将一些参考推送到…………..
I'm getting
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
To [email protected]:...
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to …………..
(see bottom for full listing)
This is an application that is currently working on heroku, but heroku won't allow git push heroku master to update the code.
However, if I clone the code to a new folder and do a heroku create to create a new app with seeded data, the new app works fine. However, I don't want to use the new app because I have data on the functioning app I want to persist.
There seems to be something on the existing app or gems that is resisting being updated. I wouldn't think data could stop gems from being installed, so I don't know what to do.
Suggestions?
Does "Heroku push rejected, failed to install gems via Bundler" mean that the problem is in updating a gem, or is that a red herring?
Thanks.
$ git push heroku master
Counting objects: 536, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (125/125), done.
Writing objects: 100% (391/391), 1.08 MiB, done.
Total 391 (delta 262), reused 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 rejected, failed to install gems via Bundler
To [email protected]:...
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to …………..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这意味着您已将 gem 添加到 gemfile 但尚未更新。 Gemfile.lock 与此文件不同步。
您需要更新您的捆绑包。
在应用程序目录的控制台中运行此命令:
bundle
然后执行
git push heroku
然后你就可以开始了。
**核对应用程序并重新开始。
这应该会启动一个新的应用程序。
This means that you have added gems to you gemfile but have not updated to. The Gemfile.lock is out of sync with this file.
You need to update your bundle.
Run this command in console in your app's directory:
bundle
Then do
git push heroku
And you should be good to go.
**Nuke the app and start over.
And that should get a new app up.
我刚刚遇到了同样的问题,以下内容为我解决了这个问题:
我有一个按需求(测试、开发等)分组的宝石组合,以及一些由例如两者使用的宝石
,
我删除了单行宝石,并且只是将它们复制到相关的块中(我知道不是 DRY,但到底是什么)。
做了一个快速的 Bundle,嘿,很快我就可以再次推送到 Heroku 了......
I've just had the same problem, and the following fixed it for me:
I had a combination of gems grouped by requirement (test, development etc), and some that were used by both e.g.
and
I deleted the single line ones, and just duplicated them in the relevant blocks (not DRY I know, but what the heck).
Did a quick Bundle, and hey presto I could push to Heroku again...
据我所知,这是一个Windows问题。
为什么 Heroku 在 Windows 中不接受我的 Gemfile.lock?< /a>
我花了几个小时试图解决这个问题,但没有任何结果。是时候转移到虚拟机并尝试一下了。真糟糕。
From what I have read, this is a windows issue.
Why won't Heroku accept my Gemfile.lock in Windows?
I've spent hours trying to figure this out and no dice. Time to move to a virtual machine and try there. Bummer.
我遇到了同样的错误,并在命令行中运行以下代码解决了它:
$ heroku config:set BUNDLE_WITHOUT="development:test"
我认为上面描述的 gemfile.lock 问题是红鲱鱼。
I was getting the same error, and running the following code in the command line solved it:
$ heroku config:set BUNDLE_WITHOUT="development:test"
I think the gemfile.lock issues described above are red herrings.
或者,Heroku 可能存在 API 问题并且已关闭。检查https://status.heroku.com/
今天我在一个成熟的应用程序中发生了这种情况。
Or, it could be that Heroku is having API issues and is down. Check https://status.heroku.com/
This happened to me today with a mature app.