Skip to content

Commit 16281db

Browse files
yahondaclaude
andcommitted
Require "logger" before "active_record" in spec helper
ActiveRecord 6.0 / 6.1 reference the top-level Logger constant at load time via ActiveSupport::LoggerThreadSafeLevel. If logger is not required before active_support is loaded, requiring active_record fails with: NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger Explicitly require "logger" first so the older Rails rows in the per-Rails gemfile matrix (AR 6.0 / 6.1) can load the specs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 71de47a commit 16281db

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

spec/spec_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
require "rspec"
2020

2121
unless ENV["NO_ACTIVERECORD"]
22+
require "logger"
2223
require "active_record"
2324
require "active_record/connection_adapters/oracle_enhanced_adapter"
2425
if ActiveRecord::ConnectionAdapters.respond_to?(:register)

0 commit comments

Comments
 (0)