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 gems.RubyForge.org in there, you might want to change it back. It worked like this for us:

sudo gem sources -r http://rubyworks.rubyforge.org/redhat/GEMS/i386
sudo gem sources -a http://gems.rubyforge.org

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: