$ gem install rails失败。任何解决方法?

时间:2011-12-20 19:18:04

标签: ruby-on-rails ruby rubygems

我出于某种原因在OS X Lion上安装Rails时遇到问题......

在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

有人见过这个吗?知道如何让它发挥作用吗?

2 个答案:

答案 0 :(得分:1)

实际上,它似乎特意挂在我系统上的rdoc上。所以我将gem下载到我的桌​​面并安装了......

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

然后Rails安装就可以在那之后完成。

答案 1 :(得分:0)

看起来像rubygems服务器的临时问题 我现在很难更新我的宝石。
一段时间后再试一次,从几分钟到几个小时。