rapid7/metasploit-framework — pull request #2717 by todb-r7 (2013-12-03 18:36:17+00:00)
Title: Bundler redirection

This PR sets bundler to always install gems to $MSF_ROOT/vendor/bundle. This achieves some desirable effects:

* We know for sure you can write to this directory.
* If Metasploit's gems cause your A/V to false positive on Metasploit files (likely in the future), you can simply whitelist your git checkout and not worry about whitelisting your usual $GEM_PATH or specific gems.
* You can keep your git checkout of Metasploit framework more completely on a USB drive if you have a temporary OS. (Doesn't address the ~/.msf4 creation, though, so this is only mostly complete)

Some undesirable effects:

* If you have a local .bundle/config, this will overwrite/conflict with that.

No Metasploit developer has ever claimed (to me) to have configured bundler explicitly this way, though. I'm not sure this is a practical concern.

## Verification

- [ ] Ensure you are using a developer gemset: `rvm gemset list | grep =` or `rvm-prompt` . This should be set automatically by `.ruby-gemset` if you are using RVM (or rbenv?)
- [ ] After landing, run 'bundle install'
- [ ] See that gems are installed to the local vendor/bundle path by spot-checking: `bundle show network_interface` . It should have a result like so:

````
$ bundle show network_interface
/home/todb/git/rapid7/metasploit-framework/vendor/bundle/ruby/1.9.1/gems/network_interface-0.0.1
````