安装导轨时未找到Gem存储库 [英] Gem repository not found when installing rails

查看:158
本文介绍了安装导轨时未找到Gem存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

在我的控制台中,当我执行 ruby​​ -v 它给了我Ruby 1.8.7



现在当我尝试时

  gem install rails -v 2.3.8 

我得到这个错误 p>

 错误:http://gems.rubyforge.org/似乎不是存储库
错误:无法找到gem rails本地或存储库中

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

  gem update --system 

我得到这个错误

 更新RubyGems 
错误:http://gems.rubyforge .org /似乎不是存储库
错误:执行gem时(Gem :: RemoteFetcher :: FetchError)
Errno :: E10013:试图访问
的访问权限被禁止。 - connect(2)(http://gems.rubyforge.org/yaml)`

什么是

解决方案

> gem sources

这会告诉你你正在使用什么资源。

 宝石来源-a http://rubygems.org 
宝石来源-a http://gems.github.com
gem sources -a http://gems.rubyforge.org/

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

I have Ruby 1.8.7 and Ruby 1.9.2 installed on my Windows Machine.

In my console when I do ruby -v it gives me Ruby 1.8.7

Now when I try

gem install rails -v 2.3.8

I get this error

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

My RubyGems version show 1.3.5 so I tried to update it

gem update --system

I get this error

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)`

What is going wrong?

解决方案

Give this a try.

gem sources 

That will show you what sources you are using.

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

Those will add the most used gem sources.

这篇关于安装导轨时未找到Gem存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆