Keeping Your Bundler Gems Isolated
I recently switched my laptop from rvm to rbenv.
The first time I ran bundle install in a project, it installed all of the gems into the gem directory for the Ruby version I was using with rbenv. I was hoping it would keep them isolated to the project.
Although it's not automatic, this is easy to do:
bundle config path vendor/bundle
Now bundler will install all gems into the vendor/bundle directory of each of your projects. You should probably add that directory to .gitignore.
Hat tip to http://dan.carley.co/blog/2012/02/07/rbenv-and-bundler/
Written by Tim Moore
Related protips
1 Response
If you want to be suuuper lazy, you can even do bundle config path ./bundle/gems, since you've probably already gitignored .bundle.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#