Running rubygems 1.1.0? Have fun updating.

What happens when you type: gem --version

If you see 1.1.0, then you're in for a treat because rubygems 1.1.0 blows up when it encounters an exception when updating the local gem source list, which it always seems to do before updating a gem. Some gems were written after rubygems 1.1.0 was released, so they're written to require rubygems 1.2.0. This causes a problem when running older versions of rubygems. In my case it was the flow gem that was causing this exception, which caused my gem update to fail. Updating rubygems itself was also impossible through the normal means: gem update --system

So if are trying to update your gems or rubygems itself and you can an error like could not find foo locally or in a repository where foo is whatever gem you are trying to update, first you might want to try deleting your gem source cache. If you're still having trouble even after this, then you'll have to update your rubygems manually.

How to update manually:

  1. Go to Ruby Forge and download rubygems 1.2.0 or higher. Download the zip or gzipped tar.
  2. Navigate to that directory and run sudo ruby setup.rb install
  3. That's it, now you have rubygems 1.2.0 and you can update your gems successfully via gem update rails or whatever.

Thanks to Robert for solving this mystery for me. I just wrote about what I watched him do on my computer :)

12:26 PM | 0 Comments