过去几天我每天都经常收到这个错误…
$gem install rails -v 3.2.1 ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Forbidden 403 (http://production.cf.rubygems.org/gems/rdoc-3.12.gem)
我基于previous question的理解是,这是由于远程存储库的问题,解决方案是等待一会儿再试一次.实际上,有时当我等待几个小时或过夜时,安装命令会起作用.
但是,我希望获得更可靠的体验.
我想到下载rails-3.2.1.gem等文件,然后运行……
$gem install --local ~/Desktop/rails-3.2.1.gem
但那给了我……
$gem install --local ~/Desktop/rails-3.2.1.gem ERROR: While executing gem ... (Gem::DependencyError) Unable to resolve dependencies: rails requires railties (= 3.2.1)
我可以尝试下载铁路.也许我会.但是我感觉到一个兔子洞陷入困境,在整天依赖之后寻找依赖.
任何其他有效的安装宝石的方法?我可以通过我的存储库规范做些什么来让gem安装更可靠吗?
$gem environment RubyGems Environment: - RUBYGEMS VERSION: 1.8.15 - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0] - INSTALLATION DIRECTORY: /Users/ethan/.rvm/gems/ruby-1.9.2-p290@rails_3_for_mtc - RUBY EXECUTABLE: /Users/ethan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby - EXECUTABLE DIRECTORY: /Users/ethan/.rvm/gems/ruby-1.9.2-p290@rails_3_for_mtc/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-darwin-11 - GEM PATHS: - /Users/ethan/.rvm/gems/ruby-1.9.2-p290@rails_3_for_mtc - /Users/ethan/.rvm/gems/ruby-1.9.2-p290@global - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["http://rubygems.org"] - "gem" => "--no-rdoc --no-ri" - "install" => "--no-rdoc --no-ri" - "update" => "--no-rdoc --no-ri" - REMOTE SOURCES: - http://rubygems.org
解决方法
确保您的rvm ssl证书是最新的.
检查他们的状态
$rvm osx-ssl-certs status all
更新他们!
$rvm osx-ssl-certs update all