0

Per Using multiple Bundler versions, https://github.com/rbenv/rbenv/issues/235, et. al. using underscores around the version number should allow me to use different bundler versions on my machine. However, this is not working for me.

When I specify a bundler version that I don't have installed bundler correctly complains though, so it seems to be version checking at least.

$ gem list bundler

*** LOCAL GEMS ***

bundler (2.0.2, 1.17.3, 1.17.0)

$ bundle _1.17.3_ -v
Bundler version 2.0.2

$ bundle _1.17.2_ -v
/Users/user/.rbenv/versions/2.3.6/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem bundler (= 1.17.2) (Gem::GemNotFoundException)
  from /Users/user/.rbenv/versions/2.3.6/bin/bundle:22:in `<main>'

I'm seeing this on OS X Mojave 10.14.6, but not running the same experiment on Ubuntu.

I'm looking for suggestions on debugging this.

eebbesen
  • 5,070
  • 8
  • 48
  • 70
  • Shouldn't bundler [autoswitch](https://bundler.io/blog/2019/01/03/announcing-bundler-2.html) to the correct version anyway based on the version specified in Gemfile.lock. – Kris Sep 10 '19 at 07:55
  • Yes @kris, but I was also seeing this where there was no Gemfile/Gemfile.lock. In any case I uninstalled all the bundler versions, then reinstalled and now I'm not able to recreate my original issue :(. But I think someone else has been able to and a PR is in the works: https://github.com/rubygems/rubygems/pull/2908/files – eebbesen Sep 13 '19 at 18:49
  • 1
    And the fix: https://github.com/rubygems/rubygems/pull/2908 – eebbesen Sep 25 '19 at 13:41

0 Answers0