Heroku在成熟应用程序中拒绝推送(预接收钩拒绝) [英] Heroku rejecting push in mature application (pre-receive hook declined)

查看:167
本文介绍了Heroku在成熟应用程序中拒绝推送(预接收钩拒绝)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到

 失败:http://devcenter.heroku.com/articles/bundler 

! Heroku推送被拒绝,未能通过Bundler安装宝石
至git@heroku.com:...
! [远程拒绝] master - > master(pre-receive hook refused)
错误:无法将一些文件推送到............ ..
(请参阅底部以获取完整列表)



这是一个目前正在使用heroku的应用程序,但heroku不会允许git push heroku master更新代码。



但是,如果我将代码克隆到新文件夹并执行heroku创建以创建带有种子数据的新应用程序,则新应用程序可以正常工作。但是,我不想使用新的应用程序,因为我有关于正在运行的应用程序的数据,我希望持久存在。



现有应用程序似乎存在某些问题,或者拒绝更新的宝石。我不认为数据可能会阻止安装宝石,所以我不知道该怎么做。



建议?



Heroku推送被拒绝,未能通过Bundler安装宝石意味着问题在于更新宝石,或者是一个红色鲱鱼?



感谢。



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

  -----> Heroku接收推送
----->删除.DS_Store文件
-----> Rails应用程序检测到
----->检测到Rails没有设置为static_assets
安装rails3_serve_static_assets ... done
----->配置Rails 3以禁用x-sendfile
安装rails3_disable_x_sendfile ... done
----->配置Rails以记录到标准输出
安装rails_log_stdout ... done
----->检测到Gemfile,运行Bundler版本1.0.7
检测到未解析的依赖关系;正在安装...
使用 - 无需开发:测试
检测到Windows Gemfile.lock,忽略它。
您在开发过程中修改了您的Gemfile,但未将
的结果快照(Gemfile.lock)检入版本控制
您已添加到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
*回形针(〜> 2.3)
* formtastic(〜> 1.2.3)
* hirb
* kaminari
* rspec(= 2.5.0)
* webrat
* factory_girl_rails(= 1.0)
* cucumber
* mocha
失败:http: //devcenter.heroku.com/articles/bundler



! Heroku推拒绝,未能通过Bundler安装宝石



至git@heroku.com:...
! [远程拒绝] master - > master(pre-receive hook refused)
错误:未能将某些文件推送到............ ..

解决方案

 您在开发过程中修改了Gemfile,但没有将生成的快照(Gemfile.lock)
检入版本控制

这意味着您已将gem添加到gemfile中,但尚未更新到。 Gemfile.lock与此文件不同步。



您需要更新您的套件。



运行这个命令在你的应用程序的目录下: bundle



然后执行 git push heroku



你应该很好去。



**将应用程序和重新开始。

  gem install taps #install taps 
heroku db:pull #pull your data to your local machine

rm -rf .git #remove你的git repo
git init#创建一个新的repo
git add。 #添加所有文件
git commit -m'master'#commit as master

heroku create#创建一个新的heroku应用
heroku重命名myapp#重新命名应用
git push heroku master #push to heroku

heroku db:push#将数据推送到heroku

这应该会得到一个新的应用程序。


I'm getting

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

! Heroku push rejected, failed to install gems via Bundler To git@heroku.com:... ! [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 git@heroku.com:... ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to …………..

解决方案

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

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.

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

And that should get a new app up.

这篇关于Heroku在成熟应用程序中拒绝推送(预接收钩拒绝)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆