Update Ruby Gems on Ubuntu
Really quick post here:
I'm trying to run some Rails apps I'm tinkering with from a while ago. It seems my local Ruby Gems version was out of date and running the suggested "Please 'gem update --system' and try again." didn't do anything. The error here was:
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 update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.
Ugh. So I had solved this problem before in another environment, but of course didn't record it anywhere. Here's me recording the solution:
sudo gem install rubygems-update
"1 gem installed" and now the version is correct. Nice.
...uh... that actually didn't work apparently. Still getting the "need version 1.3.1" message. So, I found this and it worked:
$ sudo gem install update_rubygems
$ cd /var/lib/gems/1.8/bin
$ sudo ./update_rubygems
$ gem -v
1.3.1
$ sudo gem install rails
$ cd /var/lib/gems/1.8/bin
$ sudo ./update_rubygems
$ gem -v
1.3.1
$ sudo gem install rails
Moving on...
Comments
You seem very experienced in
You seem very experienced in Linux (Ubuntu), I've been using this version of Linux from 2-3 years and I have used some of your tips(including this one) and it has worked really well for me.
Ecommerce Web Design