no more `bundle exec`
To avoid bundle exec use my gem rubygems-bundler it will automatically detect if Bundler.setup should be run.
Installation:
gem install rubygems-bundler
gem regenerate_binstubs # only once
The gem is already disributed with RVM so in most cases you should have it by default, just in case run once:
gem regenerate_binstubs # only once
You can find more information on the project page: https://github.com/mpapis/rubygems-bundler or on my blog: http://niczsoft.com/2012/05/rubygems-bundler-integration-gem-1-0-0/
Written by Michal Papis
Related protips
3 Responses
Instead of bundle exec, why not just bin (--binstubs)?
@justinko binstubs require an additional action (adding to PATH), it's not fully safe as someone can add bin/rake to your project with malicious code. Also binstubs are less intelligent, it's just a brute force - when in project use binstubs, you would need to reedit your PATH to not include ./bin/ in case you would like to run command that is in Gemfile but you do no want to run it in context of the project.
Wow that's an amazing tip !