3 ms·
In my opinion, Bundler deprecates the need--or at least the need in most cases--to use gemsets. They are still a great feature to give you great control over ex
by wuputah 16y ago
In my opinion, Bundler deprecates the need--or at least the need in most cases--to use gemsets. They are still a great feature to give you great control over exactly which gems are installed for testing purposes, but once you switch your applications to using Bundler, there's rarely a need to keep each project in its own gemset.
What Bundler does is establish a container for all gems (and ONLY those gems) that your application needs to run. This is much like an automatic, application-specific gemset.
It also solves the difficult problem of resolving your applications dependencies, locking your gems to a particular set of dependencies to assure consistency across environments and deployments. This is a very critical feature and really showed its ugly head when Rails 2.3.8 was released. Users suddenly found their projects breaking because one gem would load the latest version of activesupport installed on their system (e.g. activesupport-2.3.8) while Rails would require exactly version 2.3.5. Bundler solves this problem by determining that 2.3.5 is the correct dependency and locks the application to only load that version.
It is exactly because of this feature that gemsets are now rarely needed. A large repository of gems will no longer cause you pain and hassle, as Bundler will pick and choose (or install) whichever gems you need to run the project. No more manual management of gemsets. Hooray!
- dasil003 16y agoIn short, rvm operates at the individual developer level, and bundler at the application level. rvm gemsets are still a great way to have a general purpose Rails 2 setup and Rails 3 setup on the same machine. Granted, if you only work with applications that use Bundler, it's totally unnecessary. But often you will have legacy apps, or you just want to hack around quickly on some code without set up a Gemfile.