3

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?

Veger
  • 37,240
  • 11
  • 105
  • 116
Rohit
  • 5,631
  • 4
  • 31
  • 59
  • 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 Jan 28 '11 at 05:47

2 Answers2

11

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.

thenengah
  • 42,557
  • 33
  • 113
  • 157
  • 5
    Should be using rubygems.org as the official source now. – Ryan Bigg Jan 28 '11 at 06:01
  • 3
    If you get the error: http://gems.rubyonrails.org does not appear to be a repository remove that repo from your sources list. `gem sources -r http://gems.rubyonrails.org` – lhoess Oct 11 '12 at 14:12
1

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!

Benny Thomas
  • 151
  • 4
  • 4