ruby-on-railsrubyrubygems

uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)


rails 6.1.7.10

ruby 2.6.6.

Just did a bundle update to 6.1.7.10 from 6.1.7.8 Now running the application I receive the following error:

/home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:16:in `module:LoggerThreadSafeLevel': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

traceback shows:

...   
14: from /home/cb/work/sb/config/environment.rb:2:in `<top (required)>'
13: from /home/cb/work/sb/config/environment.rb:2:in `require_relative'
12: from /home/cb/work/sb/config/application.rb:3:in `<top (required)>'
11: from /home/cb/work/sb/config/application.rb:3:in `require'
10: from /home/cb/.gem/ruby/2.6.6/gems/railties-6.1.7.10/lib/rails.rb:7:in `<top (required)>'
 9: from /home/cb/.gem/ruby/2.6.6/gems/railties-6.1.7.10/lib/rails.rb:7:in `require'
 8: from /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support.rb:29:in `<top (required)>'
 7: from /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support.rb:29:in `require'
 6: from /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support/logger.rb:3:in `<top (required)>'
 5: from /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support/logger.rb:3:in `require'
 4: from /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support/logger_silence.rb:5:in `<top (required)>'
 3: from /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support/logger_silence.rb:5:in `require'
 2: from /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>'
 1: from /home/cb/.gem/ruby/2.6.6/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>'
 /home/cb/.gem/ruby/2.6.6/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 console is unaffected

unable to find why this is now happening in the application


Solution

  • This appears to have broken the cocoapods integration in our iOS project. As above, running
    bundle add concurrent-ruby -v 1.3.4
    in the project root resolved the issue.
    This might cause issues down the road as cocoapods updates so keep an eye on that and remove this line if/ when that happens.

    Edit:
    Yes, I know this isn't answering exactly the question that is being asked and a little off-topic, but as an iOS developer, this post was the first result in google, therefore I thought I would leave hints for others like me. I assume that's why I'm getting downvoted.