How do I view a list of all the gems in a given gemset? And is it possible to use multiple gemsets at a time or only one?
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 .
Ruby on Rails Gems Gemsets 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.
Assuming that you are already on your project directory. Now run these commands from your CLI. 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 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.
You can call gem list
and it will display all the gems in your current gemset. You can only use one gemset at a time, but there is a hierarchy of gemsets. You can create a global
gemset with (for example) rake
and pry
in it, and then any gemset you create (using the same version of ruby, of course) will inherit those gems into it.
Usually the current Ruby's @global gemset is included in other gemsets.
To see the contents of a gemset, excluding the @global gemset, first do rvm use 2.0.0@some-gemset --ignore-gemsets
(or similar) then gem list
.
For the default gemset, do rvm use 2.0.0 --ignore-gemsets
then gem list
.
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