Can't install any gems

10,756

Solution 1

For Mac OSX the solution that worked for me was:

sudo gem install rubygems-update   --source http://production.s3.rubygems.org/
sudo gem update --system           --source http://production.s3.rubygems.org/

It comes from some file on github of all places.

Solution 2

Try reinstalling rubygems from scratch here: http://rubygems.org/pages/download

RubyForge has been deprecated and may no longer be working properly. The other possibility is that when you tried to do this rubyforge or gemcutter was down, or otherwise not accessible over your network. You can also try seeing if you can reach the file on rubygems by entering it in your browser (to test your network): http://gemcutter.org/specs.4.8.gz

This question has previously been asked here: RubyGems 1.2+ index not found for:. It appears the problem was that rubyforge was blocked by China's firewall.

Good luck!

Share:
10,756
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I have been doing JavaScript and some Erlang for around six months and I haven't done any Rails programming lately. Today on my new PC I went to install Rails but got this error:

    gem install rails
    WARNING:  RubyGems 1.2+ index not found for:
            http://gems.rubyforge.org/
    
    RubyGems will revert to legacy indexes degrading performance.
    Bulk updating Gem source index for: htp://gems.rubyforge.org/
    ERROR:  While executing gem ... (Gem::RemoteSourceException)
        Error fetching remote gem cache: SocketError: getaddrinfo: The system cannot
     find the file specified.  (http://gems.rubyforge.org/yaml)
    

    A friend of mine said: "gem -v?" to which I responded "1.3.5". He suggested I update to 1.3.6 but I had the same problem. Then I installed a few gems for testing purposes from github.

    I don't know if I'm missing a source or something, or if something changed drastically in gems.

    Also:

    gem sources -a htp://gemcutter.org/
    Error fetching htp://gemcutter.org/:
            SocketError: getaddrinfo: The system cannot find the file specified. (http://gemcutter.org/specs.4.8.gz)