a_8-bw
Last Updated: February 25, 2016
·
7.995K
· mpapis

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/

3 Responses
Add your response

1687

Instead of bundle exec, why not just bin (--binstubs)?

over 1 year ago ·
2334

@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.

over 1 year ago ·
2433

Wow that's an amazing tip !

over 1 year ago ·