【问题标题】:Gem repository not found when installing rails安装 Rails 时找不到 Gem 存储库
【发布时间】:2011-06-17 01:06:56
【问题描述】:

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

在我的控制台中,当我执行 ruby -v 时,它给了我 Ruby 1.8.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)`

出了什么问题?

【问题讨论】:

  • 对不起,伙计们,我投票结束了这个问题。实际上我犯了一个愚蠢的错误,我的AV防火墙是我没有照顾的。并进入了这个。对不起

标签: ruby-on-rails ruby windows rubygems installation


【解决方案1】:

试试这个。

gem sources 

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

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

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

【讨论】:

  • 现在应该使用 ruby​​gems.org 作为官方来源。
  • 如果您收到错误:gems.rubyonrails.org 似乎不是存储库,请从源列表中删除该存储库。 gem sources -r http://gems.rubyonrails.org
【解决方案2】:

我遇到了同样的错误,但是当我尝试使用 SET HTTP_PROXY 设置公司的代理时,我遇到了一个问题,因为代理使用 NTLM 验证,我需要指定我的 AD-Domin,它无法使用 gem。我解决它的方法是安装提琴手并启动它,然后设置

SET HTTP_PROXY=http://localhost:8888

然后我的宝石像魅力一样安装!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-05-02
    • 1970-01-01
    • 2019-11-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多