Skip to content

Add support for and start testing against Ruby 4#434

Open
larouxn wants to merge 2 commits intoShopify:mainfrom
larouxn:ruby_4
Open

Add support for and start testing against Ruby 4#434
larouxn wants to merge 2 commits intoShopify:mainfrom
larouxn:ruby_4

Conversation

@larouxn
Copy link
Contributor

@larouxn larouxn commented Feb 18, 2026

What are you trying to accomplish?

Add support for and start testing against Ruby 4.

Requires

What approach did you choose and why?

Taken a multi-step approach as can be seen by my various PRs.

  1. Add no-longer-standard gems to the Gemfile and Gemspec.
  2. Upgrade gems (minitest, mocha, pry-byebug/byebug, nokigiri, stringio, i18n) to versions that support Ruby 4.
  3. Add Ruby 4 to CI matrix.
  4. Update .ruby-version to 4.0.1.
  5. Run bundle exec rake and confirm everything looks alright.

Note, for step 1 above I followed the logs (below) that noted various gems as no-longer-standard-library. Specifically added the development gems (irb and benchmark) to the Gemfile and the production gems (logger and ostruct) to the Gemspec. Note, we don't need to add reline if we upgrade pry-byebug to latest in this PR.

Logs showing required gems

reline

bundle exec rake
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:169: warning: method redefined; discarding old encode_with
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/dependency.rb:341: warning: previous definition of encode_with was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:239: warning: already initialized constant Gem::Platform::JAVA
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:279: warning: previous definition of JAVA was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:240: warning: already initialized constant Gem::Platform::MSWIN
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:280: warning: previous definition of MSWIN was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:241: warning: already initialized constant Gem::Platform::MSWIN64
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:281: warning: previous definition of MSWIN64 was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:242: warning: already initialized constant Gem::Platform::MINGW
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:282: warning: previous definition of MINGW was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:243: warning: already initialized constant Gem::Platform::X64_MINGW
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:284: warning: previous definition of X64_MINGW was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:245: warning: already initialized constant Gem::Platform::WINDOWS
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:286: warning: previous definition of WINDOWS was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:246: warning: already initialized constant Gem::Platform::X64_LINUX
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:287: warning: previous definition of X64_LINUX was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:247: warning: already initialized constant Gem::Platform::X64_LINUX_MUSL
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:288: warning: previous definition of X64_LINUX_MUSL was here
/home/larouxn/.gem/ruby/4.0.1/gems/i18n-1.14.1/lib/i18n/exceptions.rb:3: warning: CGI library is removed from Ruby 4.0. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
If you need to use the full features of CGI library, Please install cgi gem.
    Sorry, you can't use byebug without Readline. To solve this, you need to
    rebuild Ruby with Readline support. If using Ubuntu, try `sudo apt-get
    install libreadline-dev` and then reinstall your Ruby.
/home/larouxn/.gem/ruby/4.0.1/gems/byebug-11.1.3/lib/byebug/history.rb:4:in 'Kernel#require': cannot load such file -- readline (LoadError)
Did you mean?  reline
        from /home/larouxn/.gem/ruby/4.0.1/gems/byebug-11.1.3/lib/byebug/history.rb:4:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/byebug-11.1.3/lib/byebug/interface.rb:4:in 'Kernel#require_relative'
        from /home/larouxn/.gem/ruby/4.0.1/gems/byebug-11.1.3/lib/byebug/interface.rb:4:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/byebug-11.1.3/lib/byebug/core.rb:7:in 'Kernel#require_relative'
        from /home/larouxn/.gem/ruby/4.0.1/gems/byebug-11.1.3/lib/byebug/core.rb:7:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/pry-byebug-3.10.1/lib/byebug/processors/pry_processor.rb:3:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/pry-byebug-3.10.1/lib/byebug/processors/pry_processor.rb:3:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/pry-byebug-3.10.1/lib/pry-byebug/pry_ext.rb:3:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/pry-byebug-3.10.1/lib/pry-byebug/pry_ext.rb:3:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/pry-byebug-3.10.1/lib/pry-byebug/cli.rb:4:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/pry-byebug-3.10.1/lib/pry-byebug/cli.rb:4:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/pry-byebug-3.10.1/lib/pry-byebug.rb:4:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/pry-byebug-3.10.1/lib/pry-byebug.rb:4:in '<top (required)>'
        from /home/larouxn/src/github.com/larouxn/worldwide/test/test_helper.rb:11:in 'Kernel#require'
        from /home/larouxn/src/github.com/larouxn/worldwide/test/test_helper.rb:11:in '<top (required)>'
        from /home/larouxn/src/github.com/larouxn/worldwide/test/worldwide/address_formatting_test.rb:3:in 'Kernel#require'
        from /home/larouxn/src/github.com/larouxn/worldwide/test/worldwide/address_formatting_test.rb:3:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:21:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:21:in 'block in <main>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in 'Array#select'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in '<main>'
rake aborted!
Command failed with status (1)
/home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/exe/rake:27:in '<top (required)>'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in 'Kernel.load'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in 'Bundler::CLI::Exec#kernel_load'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:492:in 'Bundler::CLI#exec'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in 'Bundler::Thor::Command#run'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor.rb:392:in 'Bundler::Thor.dispatch'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:34:in 'Bundler::CLI.dispatch'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in 'Bundler::Thor::Base::ClassMethods#start'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:28:in 'Bundler::CLI.start'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/exe/bundle:45:in 'block in <top (required)>'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/friendly_errors.rb:117:in 'Bundler.with_friendly_errors'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/exe/bundle:33:in '<top (required)>'
/home/larouxn/.gem/ruby/4.0.1/bin/bundle:25:in '<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)

benchmark

bundle exec rake
bundler: failed to load command: rake (/home/larouxn/.gem/ruby/4.0.1/bin/rake)
/home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake.rb:33:in 'Kernel#require': cannot load such file -- ostruct (LoadError)
Did you mean?  tsort
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake.rb:33:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/exe/rake:25:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/exe/rake:25:in '<top (required)>'
        from /home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems.rb:303:in 'Kernel#load'
        from /home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
        from /home/larouxn/.gem/ruby/4.0.1/bin/rake:25:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in 'Kernel.load'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in 'Bundler::CLI::Exec#kernel_load'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:492:in 'Bundler::CLI#exec'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in 'Bundler::Thor::Command#run'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor.rb:392:in 'Bundler::Thor.dispatch'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:34:in 'Bundler::CLI.dispatch'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in 'Bundler::Thor::Base::ClassMethods#start'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:28:in 'Bundler::CLI.start'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/exe/bundle:45:in 'block in <top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/friendly_errors.rb:117:in 'Bundler.with_friendly_errors'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/exe/bundle:33:in '<top (required)>'
        from /home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems.rb:303:in 'Kernel#load'
        from /home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
        from /home/larouxn/.gem/ruby/4.0.1/bin/bundle:25:in '<main>'

ostruct

bundle exec rake
bundler: failed to load command: rake (/home/larouxn/.gem/ruby/4.0.1/bin/rake)
/home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake.rb:33:in 'Kernel#require': cannot load such file -- ostruct (LoadError)
Did you mean?  tsort
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake.rb:33:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/exe/rake:25:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/exe/rake:25:in '<top (required)>'
        from /home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems.rb:303:in 'Kernel#load'
        from /home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
        from /home/larouxn/.gem/ruby/4.0.1/bin/rake:25:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in 'Kernel.load'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in 'Bundler::CLI::Exec#kernel_load'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:492:in 'Bundler::CLI#exec'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in 'Bundler::Thor::Command#run'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor.rb:392:in 'Bundler::Thor.dispatch'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:34:in 'Bundler::CLI.dispatch'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in 'Bundler::Thor::Base::ClassMethods#start'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:28:in 'Bundler::CLI.start'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/exe/bundle:45:in 'block in <top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/friendly_errors.rb:117:in 'Bundler.with_friendly_errors'
        from /home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/exe/bundle:33:in '<top (required)>'
        from /home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems.rb:303:in 'Kernel#load'
        from /home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
        from /home/larouxn/.gem/ruby/4.0.1/bin/bundle:25:in '<main>'

logger

bundle exec rake
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:169: warning: method redefined; discarding old encode_with
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/dependency.rb:341: warning: previous definition of encode_with was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:239: warning: already initialized constant Gem::Platform::JAVA
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:279: warning: previous definition of JAVA was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:240: warning: already initialized constant Gem::Platform::MSWIN
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:280: warning: previous definition of MSWIN was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:241: warning: already initialized constant Gem::Platform::MSWIN64
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:281: warning: previous definition of MSWIN64 was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:242: warning: already initialized constant Gem::Platform::MINGW
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:282: warning: previous definition of MINGW was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:243: warning: already initialized constant Gem::Platform::X64_MINGW
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:284: warning: previous definition of X64_MINGW was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:245: warning: already initialized constant Gem::Platform::WINDOWS
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:286: warning: previous definition of WINDOWS was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:246: warning: already initialized constant Gem::Platform::X64_LINUX
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:287: warning: previous definition of X64_LINUX was here
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/rubygems_ext.rb:247: warning: already initialized constant Gem::Platform::X64_LINUX_MUSL
/home/larouxn/.rubies/ruby-4.0.1/lib/ruby/4.0.0/rubygems/platform.rb:288: warning: previous definition of X64_LINUX_MUSL was here
/home/larouxn/.gem/ruby/4.0.1/gems/i18n-1.14.1/lib/i18n/exceptions.rb:3: warning: CGI library is removed from Ruby 4.0. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
If you need to use the full features of CGI library, Please install cgi gem.
/home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support/logger_thread_safe_level.rb:4:in 'Kernel#require': cannot load such file -- logger (LoadError)
        from /home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support/logger_thread_safe_level.rb:4:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support/logger_silence.rb:5:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support/logger_silence.rb:5:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support/logger.rb:3:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support/logger.rb:3:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support.rb:30:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support.rb:30:in '<top (required)>'
        from /home/larouxn/src/github.com/larouxn/worldwide/lib/worldwide.rb:4:in 'Kernel#require'
        from /home/larouxn/src/github.com/larouxn/worldwide/lib/worldwide.rb:4:in '<top (required)>'
        from /home/larouxn/src/github.com/larouxn/worldwide/test/test_helper.rb:4:in 'Kernel#require'
        from /home/larouxn/src/github.com/larouxn/worldwide/test/test_helper.rb:4:in '<top (required)>'
        from /home/larouxn/src/github.com/larouxn/worldwide/test/worldwide/address_formatting_test.rb:3:in 'Kernel#require'
        from /home/larouxn/src/github.com/larouxn/worldwide/test/worldwide/address_formatting_test.rb:3:in '<top (required)>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:21:in 'Kernel#require'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:21:in 'block in <main>'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in 'Array#select'
        from /home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/lib/rake/rake_test_loader.rb:6:in '<main>'
rake aborted!
Command failed with status (1)
/home/larouxn/.gem/ruby/4.0.1/gems/rake-13.0.6/exe/rake:27:in '<top (required)>'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in 'Kernel.load'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:58:in 'Bundler::CLI::Exec#kernel_load'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli/exec.rb:23:in 'Bundler::CLI::Exec#run'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:492:in 'Bundler::CLI#exec'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in 'Bundler::Thor::Command#run'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor.rb:392:in 'Bundler::Thor.dispatch'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:34:in 'Bundler::CLI.dispatch'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in 'Bundler::Thor::Base::ClassMethods#start'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/cli.rb:28:in 'Bundler::CLI.start'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/exe/bundle:45:in 'block in <top (required)>'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/lib/bundler/friendly_errors.rb:117:in 'Bundler.with_friendly_errors'
/home/larouxn/.gem/ruby/4.0.1/gems/bundler-2.4.10/exe/bundle:33:in '<top (required)>'
/home/larouxn/.gem/ruby/4.0.1/bin/bundle:25:in '<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)

Note

The one gem I'm not sure what to do with yet is activesupport. While the following (logs below) won't break anything it'd be nice to fix such. The CGI warning is was lead me to bump i18n. For activesupport we should really be looking at getting on latest v8.1.2. v7.1.x is EOL too.

`/home/larouxn/.gem/ruby/4.0.1/gems/activesupport-7.1.1/lib/active_support/core_ext/object/to_query.rb:3: warning: CGI library is removed from Ruby 4.0. Please use cgi/escape instead for CGI.escape and CGI.unescape features.
If you need to use the full features of CGI library, Please install cgi gem.

What should reviewers focus on?

Ideally the prerequisite PRs first as I'd like to merge this as just the Ruby 4 specific changes.

The impact of these changes

We support Ruby 4.

Testing

bundle exec rake, please note that the phonelib frozen string warnings will be fixed by #366.

image

Checklist

  • I have added a CHANGELOG entry for this change (or determined that it isn't needed)

Determined necessary as it's a pretty big change to add support for a new Ruby version.

larouxn added 2 commits March 10, 2026 22:51
- Add no-longer-stanadard-library gems to Gemfile and Gemspec
- Upgrade gems to versions that support Ruby 4
- Add Ruby 4 to CI matrix
- Bump dev Ruby from 3.4.8 to 4.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant