推送到heroku时出错 - Gem :: RemoteFetcher :: FetchError

时间:2011-07-19 18:33:12

标签: ruby-on-rails heroku

推送到heroku时出现此错误:

 Installing oa-enterprise (0.2.1)
   /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:365:in `
est': too many connection resets (http://production.cf.rubygems.org/gems/oa-
-0.2.1.gem) (Gem::RemoteFetcher::FetchError)
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:28
 `open_uri_or_path'
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:29
 `open_uri_or_path'
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:17
 `fetch_path'
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:11
 `download'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/sou
rb:254:in `download_gem_from_uri'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/sou
rb:71:in `fetch'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/ins
er.rb:45:in `run'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spe
t.rb:12:in `each'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spe
t.rb:12:in `each'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/ins
er.rb:44:in `run'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/ins
er.rb:8:in `install'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli
225:in `install'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/ven
thor/task.rb:22:in `send'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/ven
thor/task.rb:22:in `run'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/ven
thor/invocation.rb:118:in `invoke_task'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/ven
thor.rb:246:in `dispatch'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/ven
thor/base.rb:389:in `start'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
    from /usr/ruby1.8.7/bin/bundle:19:in `load'
    from /usr/ruby1.8.7/bin/bundle:19
   FAILED: http://devcenter.heroku.com/articles/bundler
   Heroku push rejected, failed to install gems via Bundler

我该如何解决?

谢谢,

乌迪德

2 个答案:

答案 0 :(得分:1)

这意味着您的gemfile中有一个无法找到或安装的宝石。列出你的gemfile,我会告诉你它是哪一个。

复制并粘贴以下捆绑包。

source 'http://rubygems.org'

gem 'rails', '3.0.5'
gem "paperclip", "~> 2.3" 
gem 'aws-s3' 
gem 'devise' 
gem 'omniauth', '0.2.0'
gem 'httparty' 
gem 'nifty-generators'

然后:

bundle
git add .
git commit -m 'new bundle'
git push heroku

然后你可以在以后添加你的开发宝石,这只是为了让生产先工作。

group :development do
    gem 'mocha' 
    gem 'will_paginate', '3.0.pre2' 
    gem 'jquery-rails' 
    gem 'faraday', '0.6' 
    gem 'uuidtools' 
end

仅供参考 - 问题在于oauth gem。我刚从heroku那里拿了一个。

答案 1 :(得分:1)

too many connection resets可能是由您的服务器(Heroku)和RubyGems的CloudFront CDN之间的连接引起的。

今天有一些关于亚马逊AWS服务的问题报告,你可以在这里查看:

http://status.aws.amazon.com/

CloudFront遇到的问题可能是您问题的根源。

你可以再试一次吗?我不认为你的宝石是问题,但更多的是网络侥幸。