For what possible reason would rvm switch gemsets when I cd into my rails project directory?
I don’t have an .rvmrc file. I set a default gemset (which “sticks” for other directories). Here’s what I mean:
[20130109_234306] will@localhost:~
$ rvm gemset list
gemsets for ruby-1.9.3-p362 (found in /Users/will/.rvm/gems/ruby-1.9.3-p362)
(default)
global
=> ruby-1.9.3
[20130109_234313] will@localhost:~
$ cd Projects/rails_project
[20130109_234320] will@localhost:~/Projects/rails_project
$ rvm gemset list
gemsets for ruby-1.9.3-p362 (found in /Users/will/.rvm/gems/ruby-1.9.3-p362)
=> (default)
global
ruby-1.9.3
The Gemfile in the rails project directory will tell RVM to switch rubies if the Gemfile specifies a ruby version (something like ruby=”1.9.3″ or #ruby=1.9.3@gemset).
This is because RVM supports more then just
.rvmrc=> https://rvm.io/workflow/projects/#ruby-versions a full list can be found here: https://github.com/wayneeseguin/rvm/blob/master/scripts/functions/rvmrc#L743-L744Note that RVM will check the following files before the Gemfile:
.rvmrc.versions.conf.ruby-version.rbfu-version.rbenv-version. So creating a.rvmrcfile with the line “rvm use ruby-1.9.3-p362@ruby-1.9.3” would make RVM ignore the Gemfile.