Skip to content

Don't test ruby 3.1 with rails 7#1630

Merged
estolfo merged 1 commit into
elastic:mainfrom
estolfo:rails-7-with-ruby-3-1
Jun 18, 2026
Merged

Don't test ruby 3.1 with rails 7#1630
estolfo merged 1 commit into
elastic:mainfrom
estolfo:rails-7-with-ruby-3-1

Conversation

@estolfo

@estolfo estolfo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Rails 7 will install the i18n gem, which does not work with ruby v3.1. So let's exclude testing rails 7 with ruby 3.1.

This is the error in ci:

NoMethodError:
  undefined method `[]' for Fiber:Class

        current = Fiber[:i18n_config] || self.config = I18n::Config.new
                       ^^^^^^^^^^^^^^
# ./vendor/ruby/3.1.0/gems/i18n-1.15.0/lib/i18n.rb:58:in `config'
# ./vendor/ruby/3.1.0/gems/i18n-1.15.0/lib/i18n.rb:88:in `load_path'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/i18n.rb:16:in `<top (required)>'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/inflector/inflections.rb:4:in `require'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/inflector/inflections.rb:4:in `<top (required)>'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/inflections.rb:3:in `require'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/inflections.rb:3:in `<top (required)>'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/inflector/methods.rb:3:in `require'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/inflector/methods.rb:3:in `<top (required)>'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/dependencies/autoload.rb:3:in `require'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support/dependencies/autoload.rb:3:in `<top (required)>'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support.rb:27:in `require'
# ./vendor/ruby/3.1.0/gems/activesupport-7.2.3.1/lib/active_support.rb:27:in `<top (required)>'
# ./vendor/ruby/3.1.0/gems/railties-7.2.3.1/lib/rails.rb:5:in `require'
# ./vendor/ruby/3.1.0/gems/railties-7.2.3.1/lib/rails.rb:5:in `<top (required)>'
# ./vendor/gems/bundler-2.6.9/lib/bundler.rb:215:in `require'
# ./spec/spec_helper.rb:31:in `<top (required)>'
# ./spec/elastic_apm/config_spec.rb:20:in `require'
# ./spec/elastic_apm/config_spec.rb:20:in `<top (required)>'

An error occurred while loading ./spec/elastic_apm/context/request/socket_spec.rb.

Root cause

i18n 1.15.0 (released 2026-06-17) introduced Fiber-backed config storage using Fiber[], which requires Ruby 3.2+. However, i18n 1.15.0 incorrectly declares required_ruby_version >= 3.1, so Bundler resolves it for ruby 3.1 but it fails at runtime.

@hegerchr hegerchr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estolfo estolfo merged commit 67ca1e5 into elastic:main Jun 18, 2026
38 of 49 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in APM-Agents (OLD) Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants