wayneeseguin/rvm — Issue #492: RVM resurrects the removed "--default" gemset
Author: karatedog
Created: 2011-10-11 22:24:20+00:00
State: open

I installed RVM for a single user, then installed Ruby 1.8.7-p352 and Ruby 1.9.2-p290. (on Ubuntu 11.04 64-bit)

Then:
$ rvm use 1.9,2
$ rvm gemset create sinatra
$ rvm gemset create rails31
$ rvm use 1.9.2@sinatra --default
So I made Ruby 1.9.2 and 'sinatra' gemset default.

Then deleted the 'sinatra' gemset (what was made --default previously):
$ rvm gemset delete sinatra

Now in theory I have only the ruby version's 'default' and the global gemset. This look true:
$ rvm use 1.9.2
And I'm in default gemset.

However if I log out and the log in (.bashrc is properly set up, 'rvm is a function') and check my gems:
$ gem list
I get an empty list. So I installed 'zyps' because it has a very strange name and can be a good candidate to find.

$ find .rvm/ -name zyps

And lookee-lookee, a new folder, named 'ruby-1.9.2-p290@sinatra' was created in '.rvm/gems', and this "zpys" was installed there. Sinatra (gemset) is living again.
So it looks like a '--default' gemset is strong enough to come back alive, hopefully not attacking me in my sleep.

$ rvm use 1.9.2@ --default
solved the problem.

Suggestion:
When the user deletes a gemset which is marked as '--default' RVM should make the Ruby version's default to '--default'.