7
votes

Why doesn't rvm switch to @project_gemset when I cd into my project's directory? The gemset name in my .ruby-gemset file matches the name listed from rvm gemset list.

> cd project
> ls -A
.ruby-gemset
> cat .ruby-gemset
project_gemset
> rvm gemset list

gemsets for ruby-1.9.3-p392 (found in /Users/david/.rvm/gems/ruby-1.9.3-p392)
=> (default)
   global
   project_gemset
1
Note that you can, however, have a .ruby-version without a .ruby-gemset. RVM will switch to that Ruby and will use the default gemset.David Winiecki

1 Answers

18
votes

It seems you must have both a valid .ruby-version file and a .ruby-gemset file in order for rvm to make the switch.

I was hoping it would switch gemsets and use the default ruby version, since the gemset is one of the existing gemsets for my default ruby. But that's not how it works.