"ruby -S gem update" not updating

wolf_volpi's Avatar

wolf_volpi

13 Feb, 2011 11:57 PM

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?

  1. Support Staff 1 Posted by Luis Lavena on 14 Feb, 2011 01:32 AM

    Luis Lavena's Avatar

    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.

  2. 2 Posted by wolf_volpi on 14 Feb, 2011 04:02 AM

    wolf_volpi's Avatar

    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.

  3. 3 Posted by wolf_volpi on 14 Feb, 2011 06:05 AM

    wolf_volpi's Avatar

    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

  4. wolf_volpi closed this discussion on 14 Feb, 2011 06:19 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM
18 Oct, 2014 08:39 PM
16 Oct, 2014 12:41 PM
06 Oct, 2014 02:30 PM