3
votes

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?

2
Sorry Guys I voted to close this question. Actually I made a silly mistake, my AV's firewall was on which I didn't take care of. And got into this. Sorry - Rohit

2 Answers

12
votes

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.

1
votes

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!