ruby-on-rails – 安装rails时找不到Gem存储库

我的Windows机器上安装了Ruby 1.8.7和Ruby 1.9.2.

在我的控制台,当我做ruby -v时,它给了我Ruby 1.7.7

现在,当我尝试

gem install rails -v 2.3.8

我收到这个错误

ERROR:  http://gems.rubyforge.org/ does not appear to be a repository
ERROR:  could not find gem rails locally or in a repository

我的RubyGems版本显示1.3.5,所以我尝试更新它

gem update --system

我收到这个错误

Updating RubyGems
ERROR:  http://gems.rubyforge.org/ does not appear to be a repository
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::E10013: An attempt was made to access a socket in a way forbidden by
its access permissions. - connect(2) (http://gems.rubyforge.org/yaml)`

出了什么问题?

最佳答案
试一试.

gem sources 

这将显示您正在使用的来源.

gem sources -a http://rubygems.org
gem sources -a http://gems.github.com
gem sources -a http://gems.rubyforge.org/

这些将添加最常用的宝石来源.

转载注明原文:ruby-on-rails – 安装rails时找不到Gem存储库 - 代码日志