$ gem install rails failing. Any workaround?

2019-09-06 09:32发布

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?

2条回答
Emotional °昔
2楼-- · 2019-09-06 09:45

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.

查看更多
ゆ 、 Hurt°
3楼-- · 2019-09-06 10:06

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.

查看更多
登录 后发表回答