Hombrew’s ruby formula installs bundle, but homebrew’s portable-ruby installation does not have bundle installed. Doing
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/bin/gem install bundle
put it into
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/gems/2.3.0/gems. Calling it did not touch the older extra versions in
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems, etc. Then, running
/usr/local/Homebrew/Library/Homebrew/bin/bundle clean gave me this output
Activating bundler (< 2) failed:
Could not find 'bundler' (< 2) among 4 total gem(s)
To install the version of bundler this project requires, run `gem install bundler -v '< 2'`
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/exe/bundle clean gave me this
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/gems/2.3.0/gems/bundler-1.16.2/exe/bundle:10:in `<main>'
My difficulty is because I’m still a ruby novice, and not being able to offer substantive help is holding me back from submitting a new PR. (Looking the scripts of bundler, etc., I suspect there’s confusion because it calls Mac’s system ruby.)
I think my best bet for now is to
brew bundle dump and then completely redo the homebrew installation. It might seem extreme, but I’ve been hacking away at different stuff under the hood for years, and it feels like a good opportunity for a fresh start. It does not, however, solve the problems above, unless @MikeMcQuaid, you have a different suggestion.