Updating gems in rvm’s global and default gemsets

This is mostly for my own reference; I know I’ve looked this up before and it’s always hard to find, so at least now I’ll have one place to look.

If you want to update gems that you have in your default or global gemsets because you see 2 versions of, say, bundler when you do gem list, you can install and uninstall from them by using a command like this (including the parentheses):

(rvm use @global; gem uninstall -x bundler)

Switching global and default as necessary, and uninstall and install, and bundler and rake (the 2 gems I get in this situation with).

UPDATE: Just talked with Michal Papis (@mpapis) in IRC and he recommends using:

rvm @global do gem uninstall -x bundler

which looks much nicer. As an aside, I was having an issue yesterday and Michal fixed it by the time I got into work today! Thank you so much for your help and work on rvm, Michal!!

This entry was posted in Ruby on OSX, rvm. Bookmark the permalink.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>