If you are using RVM(Ruby Version Manager) then using a gemset for each project is a good idea. 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.8) a @global gemset per ruby interpreter. Gems you install to the @global gemset for a given ruby are available to all other gemsets you create in association with that ruby. This is a good way to allow all of your projects to share the same installed gem for a specific ruby interpreter installation.
Creating gemsets
Suppose you already have ruby-2.3.1 installed and you have selected it using this command:
rvm use ruby-2.3.1
Now to create gemset for this ruby version:
rvm gemset create new_gemset
where the new_gemset is the name of gemset. To see the list of available gemsets for a ruby version:
rvm gemset list
to list the gems of all ruby versions:
rvm gemset list_all
to use a gemset from the list (suppose new_gemset is the gemset I want to use):
rvm gemset use new_gemset
you can also specify the ruby version with the gemset if you want to shift to some other ruby version:
rvm use ruby-2.1.1@new_gemset
to specify a default gemset for a particular ruby version:
rvm use 2.1.1@new_gemset --default
to remove all the installed gems from a gemset you can empty it by:
rvm gemset empty new_gemset
to copy a gemset from one ruby to another you can do it by: