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
Step 1: rvm gemset create [name of gemset] Step 2: rvm --rvmrc [ruby version here]@[name of gemset] # Note: You can check your current ruby version by running "ruby -v" from your console. Step 3: Refresh your directory. # You can simply do this by checking out of your directory and going back to that directory again.
A gemset is just a container you can use to keep gems separate from each other. Creating a gemset per project allows you to change gems (and gem versions) for one project without breaking all your other projects. Each project need only worry about its own gems. RVM provides (>= 0.1.
You need to specify the gemset you want to empty. It's not enough just to "rvm use [gemset_name]". You need to "rvm gemset empty [gemset_name]". I suppose if you have many gems, it could take a while to uninstall them all.
However, to see the contents of a gemset, excluding the @global gemset, first do rvm use 2.0.0@some-gemset --ignore-gemsets (or similar for other Rubies) then gem list . Similarly to see the contents of the @global gemset, first do rvm use 2.0.0@global then gem list .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With