在配置gem的過程當中,有極小機率會遇到gem安裝後失效的問題,比方說會403,以下所示:linux
C:\Users\geraldlau>gem update --system
Updating RubyGems...
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 403ruby
C:\Users\geraldlau>gem install rubygems-update
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 403ui
C:\Users\geraldlau>gem sources -r http://gems.rubyforge.org
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 403spa
這是一個很神奇的事情,因此說這個世界充滿了奇妙。遇到這個問題,本地是不管如何都無法使用gem的了,只有去官方從新下載最新版的gem,本地安裝後才能修復。code
直接到http://rubyforge.org/frs/?group_id=126,下載最新版本的gem,而後本地安裝。若是是win環境,建議拉zip包,若在linux下面,就隨便拉哪一種都行了。把gem包拉到本地並解壓後,安裝它:ip
C:\>cd rubygems-1.3.5rem
C:\rubygems-1.3.5>dir/w
驅動器 C 中的卷是 WIN7
卷的序列號是 5E56-471Bget
C:\rubygems-1.3.5 的目錄it
[.] [..] .autotest .docume
[bin] ChangeLog cruise_config.rb GPL.txt
History.txt [lib] LICENSE.txt Manifes
[pkgs] Rakefile README setup.r
[test] [util]
11 個文件 270,420 字節
7 個目錄 14,917,832,704 可用字節io
C:\rubygems-1.3.5>setup.rb
RubyGems 1.3.5 installed
鍩?== 1.3.5 / 2009-07-21
Bug fixes:
* Fix use of prerelease gems.
* Gem.bin_path no longer escapes path with spaces. Bug #25935 an
Deprecation Notices:
* Bulk index update is no longer supported (the code currently r
the tests)
* Gem::manage_gems was removed in 1.3.3.
* Time::today was removed in 1.3.3.
----------------------------------------------------------------
RubyGems installed the following executables:
c:/ruby/bin/gem
C:\rubygems-1.3.5>
至此,搞定它了。