Why does RVM install duplicate gems for different gemsets?
bundler, ruby, rvm
Solution
This is by design. Gemsets allow you to completely isolate the libraries used so you don't have any accidental interaction between projects. If you don't need the isolate you can just use an interpreter without a gemset:
rvm use 1.9.3
If there are a few gems you use across all projects, just switch to the global gemset for the interpreter:
rvm use 1.9.3@global
`gem install` the common gems and then they won't be re-installed per-project anymore when you are in a gemset.
While gemsets definitely aren't efficient in terms of bandwidth or HD space, they are extremely handy because you can easily blow away all dependencies for a project and re-`bundle` from scratch any time you want to. They also completely eliminate accidentally changing versions of your dependencies. If you don't like gemsets, correctly specifying versions in your `Gemfile` can get you pretty far on this without them.
As far as alternatives, rbenv is the main one I'd check out.
Problem
So, I've created a separate rvm gemset for each of my rails projects. They both use the same version of ruby `1.9.3`. This causes `bundle install` to completely install a fresh set of gems for both projects. It doesn't matter if the other project has the exact same version of the gem installed in the other gemset. I'm guessing this is the expected behavior to me but it seems like an inefficient use of hard drive space and bandwidth. I know that I could manually move some of those gems to a global gemset, but that seems tedious to me and also prone to breaking if my dependencies change for a particular project. Is there a better way to organize things, or have rvm auto detect when a gem version is already installed and just use that copy? Or is there a better alternative to RVM that I should be using.