安装rails时找不到Gem存储库

发布于 2024-10-14 10:19:33 字数 798 浏览 1 评论 0原文

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

什么是出了问题吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧夏天 2024-10-21 10:19:33

尝试一下。

gem sources 

这将显示您正在使用哪些来源。

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

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

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.

罪#恶を代价 2024-10-21 10:19:33

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

SET HTTP_PROXY=http://localhost:8888

之后我的宝石安装得像一个魅力!

I got the same error, but when I tried to set the company's proxy with SET HTTP_PROXY, I got a problem because the proxy uses NTLM validation and I needed to specify my AD-Domin which won't work wit gem. The way I got around it was installing fiddler and starting it and then setting

SET HTTP_PROXY=http://localhost:8888

afterwards my gems installed like a charm!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文