Skip to content

Ensure smooth transition between Ruby versions #9209

@forthrin

Description

@forthrin

Describe the problem as clearly as you can

Every time there is a new Ruby version, there is an ordeal of things that have to be done manually.

Did you try upgrading rubygems & bundler?

Daily.

gem update --system
gem update
gem cleanup
bundle update

Post steps to reproduce the problem

$ brew upgrade ruby
3.4.7 → 3.4.8

Which command did you run?

bundle update and friends

What were you expecting to happen?

Automatically take care of everything with Ruby update, so user doesn't have to do stuff like the following.

gem uninstall bundler
gem install bundler

cd /opt/homebrew/Cellar/ruby/3.4.8/lib/ruby/gems/3.4.0/specifications && chmod u+w rbs-* racc-* syslog-*

gem pristine byebug celes cgi damerau-levenshtein date digest enumerable-statistics equationoftime erb fcntl fiddle io-console json openssl plist_lite prism psych racc rbs

gem pristine syslog strscan ruby-prof resolv

What happened instead?

/opt/homebrew/lib/ruby/site_ruby/3.4.0/rubygems.rb:303:in 'Kernel#load': cannot load such file -- /opt/homebrew/lib/ruby/gems/3.4.0/gems/bundler-2.7.2/exe/bundle (LoadError)
	from /opt/homebrew/lib/ruby/site_ruby/3.4.0/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
	from /opt/homebrew/opt/ruby/bin/bundle:25:in '<main>'

Ignoring byebug-12.0.0 because its extensions are not built. Try: gem pristine byebug --version 12.0.0
Ignoring cgi-0.5.1 because its extensions are not built. Try: gem pristine cgi --version 0.5.1
(FLOOD)

Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=syslog version=0.3.0 platform=ruby> because it is missing extensions
Source rubygems repository https://rubygems.org/ or installed locally is ignoring #<Bundler::StubSpecification name=strscan version=3.1.6 platform=ruby> because it is missing extensions
(FLOOD)

You don't have write permissions for the /opt/homebrew/Cellar/ruby/3.4.8/lib/ruby/gems/3.4.0/specifications/rbs-3.8.0.gemspec directory.
You don't have write permissions for the /opt/homebrew/Cellar/ruby/3.4.8/lib/ruby/gems/3.4.0/specifications/racc-1.8.1.gemspec directory.
(FLOOD)

Environment

System Version: macOS 26.1 (25B78)
Model Identifier: MacBookAir10,1
Bundler       4.0.2
  Platforms   ruby, arm64-darwin-25
Ruby          3.4.8p72 (2025-12-17 revision 995b59f66677d44767ce9faac6957e5543617ff9) [arm64-darwin-25]
  Full Path   /opt/homebrew/opt/ruby/bin/ruby
  Config Dir  /opt/homebrew/Cellar/ruby/3.4.8/etc
RubyGems      4.0.2
  Gem Home    /opt/homebrew/lib/ruby/gems/3.4.0
  Gem Path    ~/.gem/ruby/3.4.0:/opt/homebrew/lib/ruby/gems/3.4.0:/opt/homebrew/Cellar/ruby/3.4.8/lib/ruby/gems/3.4.0
  User Home   ~
  User Path   ~/.gem/ruby/3.4.0
  Bin Dir     /opt/homebrew/lib/ruby/gems/3.4.0/bin
Tools
  Git         2.50.1 (Apple Git-155)
  RVM         not installed
  rbenv       not installed
  chruby      not installed
Gem.ruby      /opt/homebrew/opt/ruby/bin/ruby
bundle #!     /opt/homebrew/Cellar/ruby/3.4.8/bin/ruby

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions