If you use RVM with gemsets to manage your Ruby installations (which I do for development) and you find yourself constantly installing certain gems in all of your gemsets (like interactive_editor or pry) then there’s a way to make life easier for yourself.
Each Ruby that is installed by RVM has a @global gemset, no matter what gemset you’re using the gems of the @global gemset are always available. To install a gem into the @global gemset switch to it like you would to any other gemset (per example: rvm use 1.9.2@global) and install the gem using the gem install command. If you now create a new gemset (per example: rvm use 1.9.2@mynewgemset –create) and then type “gem list –local” you’ll see the list of gems that you installed in the @global gemset.
If you have a set of gems that you would like to have installed in the @global gemset for every new Ruby that you install using RVM you can edit the file ~/.rvm/gemsets/global.gems and add the names of the gems (each on a new line) that you want installed everywhere. If desired you can define the version of the gem to be installed by adding the -v flag as you would to the gem command.
If you want to know more about RVM then check out the RVM website at http://rvm.beginrescueend.com, its filled with lots of useful documentation :)