Ruby/Updating RubyGem on Debian-Ubuntu

From Debuntu

Jump to: navigation, search
Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again.

But running:

$ sudo gem update --system

returns:

ERROR:  While executing gem ... (RuntimeError)
    gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.

The fix to this is to install the gem updater using:

$ sudo gem install rubygems-update
$ sudo /var/lib/gems/1.8/bin/update_rubygems
Note.png
On Debian Lenny I got the error

Could not find RubyGem builder while executing /var/lib/gems/1.8/bin/update_rubygems . This could be fixed by using version 1.3.4 of rubygems-update instead of version 1.3.5.

$ sudo gem uninstall rubygems-update --version=1.3.5
$ sudo gem install rubygems-update --version=1.3.4
$ sudo /var/lib/gems/1.8/bin/update_rubygems
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Google AdSense