Rubygem 安装错误:ERROR: While executing gem ... (Gem::RemoteSourceException)

具体过程如下:

1、InstantRails-2.0安装后,在配置环境变量path中配置ruby/bin目录(如果系统中有多个RUBY,执行命令行的时候系统认的就是path中的)

2、进入DOS命令行,执行gem update --system,结果

Updating RubyGems...
ERROR:  While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://rubygems.org/yaml

     这是因为gem的配置过低,无法进行远程更新,执行gem -v 发现是1.0.1

3、从下面这个地址下载 rubygems-update-1.3.7.gem,http://rubyforge.org/frs/download.php/70695/rubygems-update-1.3.7.gem

    然后DOS命令进行该文件所在的目录,执行gem install --local rubygems-update-1.3.7.gem,出现信息

Successfully installed rubygems-update-1.3.7
1 gem installed
Installing ri documentation for rubygems-update-1.3.7...
Installing RDoc documentation for rubygems-update-1.3.7...
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README

  执行gem -v查看,发现并没有更新成功,Could not find main page README是什么意思我没弄明白,但是我从http://production.s3.rubygems.org/yaml上发现这么一句

      If you have an older version of RubyGems installed, then you can still
      do it in two steps:
      
        $ gem install rubygems-update  # again, might need to be admin/root
        $ update_rubygems              # ... here too
 我照着再执行update_rubygems,接着出现的信息很多,就不帖出来,再执行gem -v,发现更新成功,已经是1.3.7了

 这一步是一切成功的源泉!!!!!!

4、接着再执行gem update --system,提示

 Updating RubyGems
Nothing to update

你可能感兴趣的:(Install)