Friday, January 11, 2008

RubyWorks and Gem Sources

On one project, we used the awesome RubyWorks packages to install the production environment on our RedHat EL 5 servers. Then one day when upgrading some gems, we got the error "Could not find gemnamehere (> 0) in any repository". It turns out that those RubyWorks kids thoughtfully removed the original RubyForge gem source from your gem sources list. To see if this has happened to you type:

gem sources

If there is no value for in there, you might want to change it back. It worked like this for us:

sudo gem sources -r
sudo gem sources -a

The best part is that we figured this out by reading the amazingly well documented gem source code under /usr/lib/ruby/1.8/rubygems/commands

Hope this helps someone else who can't update their gems!

No comments: