gem install error, index not found, ruby on rails

前端 未结 7 560
礼貌的吻别
礼貌的吻别 2021-01-25 10:30

Problem: Cannot install any gem, any type. But I want to install riddle if that matters.

When I run sudo gem install \"gem_name\" I get the following error:

7条回答
  •  我在风中等你
    2021-01-25 11:05

    I was having the same problem and ran the following:

    gem env
    

    And saw that I had the following sources in my rubygems configuration:

    • http://gems.rubyforge.org
    • http://gems.rubyonrails.org
    • http://gems.github.com

    Based on other answers I've seen here and on the web I decided to remove the rubyonrails.org reference:

    sudo gem sources -r http://gems.rubyonrails.org
    

    I was then able to install the gem I was trying to get without the RubyGems 1.2+ index error.

    So I'd suggest trimming your list of sources down to just rubyforge and github and then trying to install the gem you want.

提交回复
热议问题