Actualizando RubyGems en Ubuntu

rubygems.png

Hoy necesitaba instalar una pequeña aplicación a través de rubygems, pero cuando ejecuté el comando:

tuxotron@tuxotron-laptop:~$ sudo gem i XXXX --source http://XXXX.org
ERROR:  Error installing XXXX:
XXXX requires RubyGems version >= 1.3.6

Crap! ¿Qué versión tengo?

tuxotron@tuxotron-laptop:~$ gem --version
1.3.5

Bueno, gem tiene un parámetro para actualizar:

tuxotron@tuxotron-laptop:~$ gem update --system
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.

Bueno que estaba. Vamos a probar con los pasos descritos en esta entrada:

tuxotron@tuxotron-laptop:~$ sudo gem install rubygems-update
Successfully installed rubygems-update-1.8.2
1 gem installed
Installing ri documentation for rubygems-update-1.8.2...
Installing RDoc documentation for rubygems-update-1.8.2...

tuxotron@tuxotron-laptop:~$ sudo /var/lib/gems/1.8/bin/update_rubygems
RubyGems 1.8.2 installed

=== 1.8.2 / 2011-05-11

* 2 minor enhancements:

  * Moved #outdated from OutdatedCommand to Specification (for Isolate).
  * Print out a warning about missing executables.

* 3 bug fixes:

  * Added missing requires to fix various upgrade issues.
  * `gem pristine` respects multiple gem repositories.
  * setup.rb now execs with --disable-gems when possible

------------------------------------------------------------------------------

RubyGems installed the following executables:
	/usr/bin/gem1.8

A ver que versión tenemos ahora:

tuxotron@tuxotron-laptop:~$ gem --version
1.8.2

Cool, vamos a intentar de instalar la gema otra vez:

tuxotron@tuxotron-laptop:~$ sudo gem i XXXX --source http://XXXX.org
Fetching: XXXX.gem (100%)
Successfully installed XXXX
1 gem installed
Installing ri documentation for XXXX-X.X.X...
Installing RDoc documentation for XXXX-X.X.X...