Heroku被拒绝,未能通过Bundler安装宝石 [英] Heroku push rejected, failed to install gems via Bundler

查看:158
本文介绍了Heroku被拒绝,未能通过Bundler安装宝石的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我努力将我的代码推送到Heroku。在搜索Google和Stack Overflow问题后,我一直无法找到解决方案。这里是我尝试git push heroku master时得到的结果:

  Heroku接收推送
---- - > Rails应用程序检测到
----->检测到Rails没有设置为static_assets
安装rails3_serve_static_assets ... done
----->检测到Gemfile,运行Bundler版本1.0.3
未检测到依赖关系;正在安装...
获取http://rubygems.org/
的源索引/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:300:in`open_uri_or_path ':bad response Not Found 404(http://rubygems.org/quick/Marshal.4.8/mail-2.2.6.001.gemspec.rz)(Gem :: RemoteFetcher :: FetchError)/ usr / ruby​​1中的
.8.7 / lib / ruby​​ / site_ruby / 1.8 / ruby​​gems / remote_fetcher.rb:172:在`fetch_path'
中。
....

最后:

 失败:http://docs.heroku.com/bundler 
! Heroku推送被拒绝,未能通过Bundler安装宝石

错误:钩子/预接收退出,错误代码为1
至git@heroku.com:myapp.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:未能将一些文件推送到'git@heroku.com:myapp.git'

感谢您的帮助!

解决方案

我不认为这是Rails版本问题,Heroku也不特定。 (我今天遇到同样的问题,在我的本地开发机器上运行 bundle install 时,使用Rails 3.0.3。)



按照Andrew的说法,在本地运行软件包更新,可以解决这个问题。

编辑
如评论建议:记住 git add。, git commit -m消息


I am struggling to push my code to Heroku. And after searching on Google and Stack Overflow questions, I have not been able to find the solution. Here is What I get when I try "git push heroku master" :

Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Gemfile detected, running Bundler version 1.0.3
       Unresolved dependencies detected; Installing...
       Fetching source index for http://rubygems.org/
       /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:300:in `open_uri_or_path': bad response Not Found 404 (http://rubygems.org/quick/Marshal.4.8/mail-2.2.6.001.gemspec.rz) (Gem::RemoteFetcher::FetchError)
        from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:172:in `fetch_path'
.
....

And finally:

FAILED: http://docs.heroku.com/bundler
 !     Heroku push rejected, failed to install gems via Bundler

error: hooks/pre-receive exited with error code 1
To git@heroku.com:myapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:myapp.git'

Thanks for your help!

解决方案

I don't think it's a Rails version problem, nor is it specific to Heroku. (I hit the same problem today, when running bundle install on my local development machine, with Rails 3.0.3.)

Running bundle update locally, as Andrew suggested, fixes the issue.

Edit: As suggested in the comments: remember to git add ., git commit -m "message"

这篇关于Heroku被拒绝,未能通过Bundler安装宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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