Bundler's sandbox relies on its ability to be present at the very beginning of the Ruby process, and to therefore have the ability to ensure that the versions of all loaded libraries will reflect the ones listed in the .
By running a system executable, you are executing Ruby code before Bundler can modify the load path and replace the normal Rubygems loading mechanism, allowing arbitrary unmanaged gems to get loaded into memory. In order to alleviate some of the noise of # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
Recently, an upgrade to Rake (from version 0.8.7 to version 0.9.0) has re-raised the issue of dependencies and versioning in the Ruby community.
I wanted to take the opportunity to reiterate some of the things I talked about back when working on Bundler 1.0.
To work around some of the remaining cases, people often advocate the use of rvm gemsets.
Combined with manually setting up application-specific gemsets, this can make sure that the "system executables" as provided via the gemset remain compatible with the , and expecting it to execute in the bundler sandbox doesn't make any sense, since you're not invoking Bundler.