How do you update rubygems using rvm and ree?

The problem, I think, is the initial command (or what you expect that command to do):

$ rvm ree gem update --system

That tells rvm to pass the gem update --system to the gem under ree, but it doesn't switch you to that particular Ruby interpreter. You continue using whatever interpreter you have set in that shell (whether by default or because you switched manually earlier in the shell session).

As an example, my default interpreter is Ruby 1.9.2. If I pass this command: rvm 1.9.1 gem install pony, then the Pony gem is installed for Ruby 1.9.1. However, I'm still using Ruby 1.9.2 after that installation is finished. If I enter irb and try require 'pony', I get a load error. If I run rvm 1.9.1 and then enter irb, Pony is installed and loads fine.

So as Brian says in his comment to your post, you could switch manually with rvm use ree. Alternatively, you could switch your initial command to this:

$ rvm ree
$ gem update --system
$ gem --version

Now you can just do :

rvm rubygems latest

Or you can define which rubygems you really want. https://rvm.io/rubies/rubygems/

Tags:

Ruby

Rubygems

Rvm