Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
675 views
in Technique[技术] by (71.8m points)

ruby - How can I get past "http://gems.rubyforge.org/ does not appear to be a repository" error message

Question 828421 asked similar question, but received only one real answer (update rubygems) and that attempt results in the same error.

Ruby version 1.9.1.p243 on Windows. Included Gem, version 1.3.5. Never installed any gems before; never did any special config for this Ruby. Ruby itself works, as does irb, and "gem" operates but can't do install (and maybe other ops).

Tried this (from a book):

gem install rspec

Got this:

ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: getaddrinfo: The storage control blocks were destroyed. (http://gems.rubyforge.org/yaml)

When I go to that URL (without "yaml") using MSIE7, I get a page titled "Gemcutter | awesome gem hosting" and have no problem wandering around that site. So I don't -think- it's a proxy problem (though this is all from inside corporate firewall/proxies/etc).

When I go to that URL -with- "yaml", it goes to "http://production.s3.rubygems.org/yaml" and shows what I assume is an update specification page, starting with this: --- !ruby/object:Gem::SourceIndex

I didn't destroy any "storage control blocks". So what is preventing gem from installing a gem?

Web search shows MANY people having this same problem over a long span of time, but I have yet to see anyone say "It's because of THIS, so do THIS to fix it." Well, someone suggested updating "gem", but trying that gets same error.

Help please?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Your browser might be using system-wide proxy settings or some sort of automatic configuration. The gem command probably doesn't. I'm behind an university proxy and I can't install/update any gems normally, but can access everything with my browser. To install gems, I normally create a tunnel to my server so I can bypass the proxy server.

This might help you to configure the proxy settings for the gem command: How do I update Ruby Gems from behind a Proxy (ISA-NTLM)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...