Dejan Levec

Ruby Gem update system on Debian

When you try to update Ruby Gem –system on Debian systems (probably also on Ubuntu) you will get the following error:

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.

Gem installed through Debian’s aptitude is configured to only be upgraded through aptitude (apt-get) package manager. That would not be a problem if aptitude had newest packages. However, they are updated irregurally and in most cases (almost ever) you will get older version than the current one.

Thankfully there is a simple solution to this problem.

Type following commands (under root user):

gem install rubygems-update
cd /var/lib/gems/1.8/bin
./update_rubygems

After that gem system should be succesfully updated.

Leave a Reply

Your email address will not be published. Required fields are marked *