Rubygems: Upgrading to RubyGems 3.2.3 breaks "bundler" executable

Created on 30 Dec 2020  路  2Comments  路  Source: rubygems/rubygems

Describe the problem as clearly as you can

Upgrading to RubyGems 3.2.3 breaks bundler executable (bundle executable works fine).

Post steps to reproduce the problem

$ rbenv install 2.7.2
$ rbenv global 2.7.2

$ bundle version
Bundler version 2.1.4 (2020-12-30 commit unknown)

$ bundler version
Bundler version 2.1.4 (2020-12-30 commit unknown)

$ gem update --system

$ gem --version
3.2.3

$ bundle version
Bundler version 2.2.3 (2020-12-22 commit 29dc3c8398)

$ bundler version
Traceback (most recent call last):
    2: from /Users/fabio/.rbenv/versions/2.7.2/bin/bundler:23:in `<main>'
    1: from /Users/fabio/.rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/rubygems.rb:300:in `activate_bin_path'
/Users/fabio/.rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/rubygems.rb:281:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundler (Gem::GemNotFoundException)

Which command did you run?

bundler version

What were you expecting to happen?

Print the actual version of bundler gem installed.

What actually happened?

I got an error.

If not included with the output of your command, run bundle env and paste the output below

Environment

Bundler       2.2.3
  Platforms   ruby, x86_64-darwin-19
Ruby          2.7.2p137 (2020-10-01 revision 5445e0435260b449decf2ac16f9d09bae3cafe72) [x86_64-darwin19]
  Full Path   /Users/fabio/.rbenv/versions/2.7.2/bin/ruby
  Config Dir  /Users/fabio/.rbenv/versions/2.7.2/etc
RubyGems      3.2.3
  Gem Home    /Users/fabio/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0
  Gem Path    /Users/fabio/.gem/ruby/2.7.0:/Users/fabio/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0
  User Home   /Users/fabio
  User Path   /Users/fabio/.gem/ruby/2.7.0
  Bin Dir     /Users/fabio/.rbenv/versions/2.7.2/bin
Tools
  Git         2.30.0
  RVM         not installed
  rbenv       rbenv 1.1.2
  chruby      not installed

Bundler Build Metadata

Built At          2020-12-22
Git SHA           29dc3c8398
Released Version  true
Bundler bug report

Most helpful comment

@deivid-rodriguez thanks for the quick fix, very much appreciated! 馃帀

All 2 comments

Thanks for your report @sanjioh!

I can confirm this although I think this issue is not specific to rubygems 3.2.3 (you can reproduce it with gem update --system 3.1.5 too). It has existed since https://github.com/rubygems/rubygems/commit/19a4b103b941571fe8fac9717754be285724f4eb, although I have no idea why we did that :man_shrugging:.

Anwyays, I'll be pushing a PR now to fix it.

@deivid-rodriguez thanks for the quick fix, very much appreciated! 馃帀

Was this page helpful?
0 / 5 - 0 ratings