Long story short is that you should manually install the Ruby Gems package manager on Ubuntu.
Grab the tar package for the version you need (as of writing this is 1.0.1) from RubyForge: RubyGems
Install the following packages
sudo apt-get install ruby ri rdoc libyaml-ruby libzlib-ruby libruby libopenssl-ruby
Then untar the RubyGems package and run it’s setup script (written in ruby)
tar xzvf <tar package>
cd <extracted folder>
sudo ruby setup.rb
I find it helpful to symlink gem1.8 to gem
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
So as to WHY you should manually install RubyGems manually instead of using apt-get. Doing a gem update managed to freeze a server I was working on. I haven’t figured out why this is happening, documentation on what’s going on is sparse, and I’m not a fan of going to source for documentation on systems I won’t be working on. Find it to be a drastic waste of time and energy to spend that much digging into a system I won’t be touching again just to point out a flaw. My theory is that
I’ve verified my theory that Debian is being zealous about it’s package system, so they try to conform Ruby Gems to work off the Debian system. This creates multiple problems in terms of availability of packages, availability of updates, and mis-representing functionality. Ubuntu is in the cross-fire because it relies on the work of the Debian package people.
More Info for the morbidly curios.- Ubuntu RubyGems
- Debian RubyExtras - The Source of the madness
The issue seems wide spread enough that there is multiple tutorials on the web on how to setup Rails on Ubuntu using a manual install of Gems.