Gem repository not found when installing rails
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://g开发者_开发知识库ems.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.
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!
精彩评论