"ruby -S gem update" not updating
I updated ruby gems, but it's still on version 1.3.5. Below is copied from my terminal:
~$ ruby -S gem -v
1.3.5
~$ ruby -S gem update
Updating installed gems
Updating cucumber
WARNING: Installing to ~/.gem since /var/lib/gems/1.8 and
/var/lib/gems/1.8/bin aren't both writable.
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
Thank you for installing cucumber-0.10.0.
Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
for important information about this release. Happy cuking!
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
Successfully installed cucumber-0.10.0
Gems updated: cucumber
Installing ri documentation for cucumber-0.10.0...
Installing RDoc documentation for cucumber-0.10.0...
~$ ruby -S gem -v
1.3.5
~$ printenv PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wolf/.gem/ruby/1.8/bin
How can I get Gems updated to version 1.5.2?
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Luis Lavena on 14 Feb, 2011 01:32 AM
If you want to update RubyGems, you need to provide the --system option:
gem update --system
"gem update" alone will only update your existing gems, not RubyGems.
See "gem help update" for detailed documentation.
This is also shown in the RubyGems README:
To upgrade to the latest RubyGems, run:
$ gem update --system # you might need to be an administrator or root
See UPGRADING.rdoc for more details and alternative instructions.
3 Posted by wolf_volpi on 14 Feb, 2011 04:02 AM
I didn't mention I am using Ubuntu 10.04. After reading about the competing dpkg and gem package systems, it seems that installing rubygems from source is the easiest solution.
4 Posted by wolf_volpi on 14 Feb, 2011 06:05 AM
Update:
The Gem install worked. Here is how I did it,
$ gem -v
1.3.5
$ sudo apt-get purge rubygems
$ cd /usr/local/src/
$ sudo wget http://production.cf.rubygems.org/rubygems/rubygems-1.5.2.tgz
$ sudo tar xzvf rubygems-1.5.2.tgz
$ cd rubygems-1.5.2/
$ sudo ruby setup.rb
RubyGems 1.5.2 installed
=== 1.5.2 / 2011-02-10
RubyGems installed the following executables:
/usr/bin/gem1.8
$ gem -v
1.5.2
$ sudo gem update --system
wolf_volpi closed this discussion on 14 Feb, 2011 06:19 AM.