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 026cd45 commit 5bca28c
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 @@ -4,6 +4,8 @@

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
# require logger before rails or Rails 6 fails to boot
require 'logger'
# load Rails first
require 'rails'
require 'active_record'
Expand Down

0 comments on commit 5bca28c

Please sign in to comment.