Search code examples
rubyreact-nativecocoapods

React Native - uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)


I am getting this error when my pipeline is running pod install. How do I fix it for my app?

I have gone over other questions but some either ask to fix ruby-concurrent version to 1.3.5 or rails version to 7.0.1. Both of which are not dependancies, at least not direct ones.

cocoapods version:
$ pod "_1.16.2_" "--version"
/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-7.0.8/lib/active_support/logger_thread_safe_level.rb:12:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-7.0.8/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>'
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-7.0.8/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-7.0.8/lib/active_support/logger_silence.rb:5:in `<top (required)>'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-7.0.8/lib/active_support/logger.rb:3:in `<top (required)>'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-7.0.8/lib/active_support.rb:29:in `<top (required)>'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.16.2/lib/cocoapods.rb:7:in `<top (required)>'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from <internal:/Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.16.2/bin/pod:36:in `<top (required)>'
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/bin/pod:23:in `load'
    from /Users/vagrant/.asdf/installs/ruby/3.0.0/bin/pod:23:in `<main>'
command failed, error: exit status 1

Solution

  • I had the exact same issue. I updated Ruby version to 3.3.5 and the problem was solved. I hope it's useful for you.