views:

105

answers:

1

The following error is displayed in command prompt in Windows 7

C:\Users\rd\Desktop\Training\Problem2\sudoku\sudoku>gem install rest-client WARNING: RubyGems 1.2+ index not found for: http://gems.rubyforge.org/

RubyGems will revert to legacy indexes degrading performance. ERROR: could not find gem rest-client locally or in a repository

A: 

Default gem source has been changed from http://gems.rubyforge.org to http://rubygems.org

Remove rubyforge from your gem sources by doing so

gem source --remove http://gems.rubyforge.org/

Add rubygems to your gem sources by doing so

gem source --add http://rubygems.org

Now when you do gem sources then you will not have http://gems.rubyforge.org and http://rubygems.org should be present.

nas
Still the error persists saying:Error fetching http://rubygems.org: SocketError: getaddrinfo: temporary failure in name resolution. (http://rubygems.org/specs.4.8.gz)Is it a temporary error due to a fault on the server side or something else?
Cody
looks like you are not able to access rubygems.org See if you can ping to it. Are you behind some firewall?
nas
`gems.rubyforge.org`, `rubygems.org` and `gemcutter.org` now all point to the same IP address, so it doesn't really matter which ones you have in your `~/.gemrc`, although `rubygems.org` is the correct one, the other two are only for backwards-compatibility and may be deactivated in the future. `rubygems.org` had some troubles recently, maybe it was just down while you were trying it?
Jörg W Mittag
@Jorg W Mittag very true, @Apoorv If you are not able to install the gem using `gem install` command due to issues with rubygems.org then you can clone or download the gem source and build/install the gem yourself locally.
nas
Thanks for your advice but second error was because of my network failure,so thanks a lot for helping
Cody
@Apoorv no problem
nas