Fix uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger error#54621
Merged
byroot merged 1 commit intorails:6-1-stablefrom Feb 25, 2025
Merged
Conversation
auto-merge was automatically disabled
February 25, 2025 15:06
Head branch was pushed to by a user without write access
de5dd25 to
aa2d381
Compare
skipkayhil
reviewed
Feb 25, 2025
aa2d381 to
3f4f75d
Compare
Member
|
I'm merging this, but just to be clear, 6.1 won't see any more releases. |
wasifhossain
added a commit
to rails-api/active_model_serializers
that referenced
this pull request
Oct 28, 2025
Context: /home/runner/work/active_model_serializers/active_model_serializers/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:16:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError) rails/rails#54621
Andryu
pushed a commit
to Andryu/simple_mysql_partitioning
that referenced
this pull request
Jan 25, 2026
Root cause: - concurrent-ruby 1.3.5 removed logger as a dependency - Rails 6.1 ActiveSupport expects Logger to be pre-loaded - This causes: NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger Solution: - Pin concurrent-ruby to ~> 1.3.0, < 1.3.5 in gemspec - Remove unnecessary active_support/all requires from lib and spec files - concurrent-ruby 1.3.4 still auto-loads Logger, fixing the issue References: - rails/rails#54271 - rails/rails#54272 - rails/rails#54621 This fixes all Rails 6.1 test failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔹 Pull Request Title
Fix missing logger dependency in
activesupport/lib/active_support/logger_thread_safe_level.rb📌 Description
This PR fixes an issue in
activesupport/lib/active_support/logger_thread_safe_level.rbcaused by a missingrequire "logger"🚀 Issue
After upgrading the concurrent-ruby gem, the library removed an implicit require "logger" statement. As a result,
activesupport/lib/active_support/logger_thread_safe_level.rbfails due to an uninitialized constant.ruby-concurrency/concurrent-ruby#1062
🔍 Fix
Explicitly add require "logger" in
activesupport/lib/active_support/logger_thread_safe_level.rbto ensure the dependency is always loaded.✅ Checklist