首先执行:
C:\ruby>gem install rails ERROR: While executing gem ... (Gem::RemoteSourceException) HTTP Response 302
C:\ruby>gem -v 0.9.4
rubygems-update-1.3.7.gem,http://rubyforge.org/frs/download.php/70695/rubygems-update-1.3.7.gem
也可以从我的csdn上下载:http://jifeng3518.download.csdn.net/
然后在cmd下cd到rubygems-update-1.3.7.gem所在的目录执行:
C:\ruby>gem install --local rubygems-update-1.3.1.gem Successfully installed rubygems-update, version 1.3.1
C:\ruby>update_rubygems
Installing RubyGems 1.3.1
mkdir -p c:/ruby/lib/ruby/site_ruby/1.8
mkdir -p c:/ruby/bin
……
C:\ruby>gem -v 1.3.1 C:\ruby>gem update --system Updating RubyGems Updating rubygems-update …………
安装rails
C:\ruby>gem install rails --include-dependencies INFO: `gem install -y` is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list ……