$ gem install rails failing. Any workaround?

前提是你 提交于 2019-12-12 03:59:59

问题


I'm having problems installing Rails on OS X Lion for some reason...

Installing under RVM...

$ gem install rails
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    bad response Forbidden 403 (http://production.cf.rubygems.org/gems/rdoc-3.12.gem)

$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.12
  - RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [x86_64-darwin11.2.0]
  - INSTALLATION DIRECTORY: /Users/ethan/.rvm/gems/ruby-1.9.3-p0@mtc_apps
  - RUBY EXECUTABLE: /Users/ethan/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/ethan/.rvm/gems/ruby-1.9.3-p0@mtc_apps/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/ethan/.rvm/gems/ruby-1.9.3-p0@mtc_apps
     - /Users/ethan/.rvm/gems/ruby-1.9.3-p0@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gemcutter.org", "http://gems.rubyforge.org/", "http://gems.github.com"]
     - "install" => "--no-rdoc --no-ri"
     - "update" => "--no-rdoc --no-ri"
  - REMOTE SOURCES:
     - http://gemcutter.org
     - http://gems.rubyforge.org/
     - http://gems.github.com

Anyone seen this? Know of a way to get it to work?


回答1:


Actually, it seemed to be hanging up specifically on rdoc on my system. So I downloaded the gem to my desktop and installed it with...

$ gem install --local ~/Desktop/rdoc-3.12.gem

Then the Rails install was able to complete after that.




回答2:


Looks like temporary problems with rubygems servers.
I have troubles updating my gems right now.
Just try again after some time, from few minutes to few hours.



来源:https://stackoverflow.com/questions/8580753/gem-install-rails-failing-any-workaround

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!