Skip to content

Conversation

@willnet
Copy link

@willnet willnet commented Dec 10, 2025

  • Add Ruby 3.4 and Rails 8.1 to the CI matrix and fixed all failing tests
  • Upgrade actions/update to the latest version
  • CI result is here

The following error was occurring:

```
NameError:
  uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
```

Resolved the issue by using concurrent-ruby versions below 1.3.5.

ref: [uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError) on Rails 7.0.8.7 and concurrent-ruby 1.3.5 · Issue #54271 · rails/rails](rails/rails#54271)
From Ruby 3.4, the output format of inspect has changed as follows:

```ruby
# Ruby < 3.4
{foo: "bar"}.inspect #=> {:foo=>"bar"}

# Ruby 3.4
{foo: "bar"}.inspect #=> "{foo: \"bar\"}"
```

Because of this change, running the tests on Ruby 3.4 caused the following failure, so I updated the test to handle different behavior depending on the Ruby version.

```
  1) Audited::Audit#audited_changes does not unserialize from binary columns
     Failure/Error: expect(audit.audited_changes).to eq "{:foo=>\"bar\"}"

       expected: #<Encoding:UTF-8> "{:foo=>\"bar\"}"
            got: #<Encoding:US-ASCII> "{foo: \"bar\"}"

       (compared using ==)
     # ./spec/audited/audit_spec.rb:75:in 'block (3 levels) in <top (required)>'
```
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