Skip to content

Commit

Permalink
require logger before requiring rails
Browse files Browse the repository at this point in the history
require 'rails' fails with the following error on Rails 6
> uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
  • Loading branch information
amatsuda committed Jan 16, 2025
1 parent 6483e0a commit 29fe702
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
$LOAD_PATH.unshift(File.join(__dir__, '..', 'lib'))
$LOAD_PATH.unshift(__dir__)

# require logger before rails or Rails 6 fails to boot
require 'logger'
require 'rails'
require 'active_record'
require 'database_rewinder'
Expand Down

0 comments on commit 29fe702

Please sign in to comment.