I can't get Bundler living happily with my side-by-side 1.8 and 1.9 install. Rubygems is just fine thanks to ~/.gemrc and --format-executable, but because bundler doesn't pick up any of the ~/.gemrc options bundle install ends up clobbering all my bin wrappers :(
Ruby 1.8 installed with --program-suffix=18, and Ruby 1.9.2 installed plain vanilla.
For rubygems I've specified gem: --format-executable in ~/.gemrc which means that all bin stubs that are generated by gem install match the corresponding ruby bin.
With this setup gem install bundler and gem18 install bundler generates bundle and bundle18 bin wrappers respectively, and everything lives happily side-by-side in my $PATH.
gem install bundler
gem18 install bundler
bundle install doesn't respect the ~/.gemrc settings because it calls Gem::Installer (which is oblivious to the gemrc), and you end up with unformatted executables, clobbering the other Ruby's bin wrappers of the same name :(
See the Gem::Installer options difference between Bundler and Rubygems:
I tried patching source.rb to use Gem::Command::Installer as opposed to Gem::Installer so the ~/.gemrc settings are picked up, but I couldn't get the tests to pass and wasn't sure whether it was supported rubygems API. Happy to get it working with tests if this is the way to go.
The bundler installer should use Gem::ConfigFile to merge the settings from ~/.gemrc like gem install
Doesn't d800773 solves this?
assume yes, this was 3 years ago.
It looks like the original issue as of version 1.11.2. The --format-executable flag in the user or system gemrc files is not respected when bundler installs a binary.