Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
guhcostan opened this issue Jan 16, 2025 · 10 comments
Closed
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Resolution: Answered When the issue is resolved with a simple answer

Comments

@guhcostan
Copy link

guhcostan commented Jan 16, 2025

Description

When running bundle install, the following error occurs

Steps to reproduce

  1. Do a "bundle install"

React Native Version

0.75.4

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 15.1.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 122.52 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.20.3
    path: ~/.nvm/versions/node/v18.20.3/bin/node
  Yarn:
    version: 1.22.18
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.7.0
    path: ~/.nvm/versions/node/v18.20.3/bin/npm
  Watchman:
    version: 2024.09.16.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12700392
  Xcode:
    version: 16.0/16A5230g
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: ^18.3.1
  react-native:
    installed: 0.75.4
    wanted: 0.75.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/logger_thread_safe_level.rb:12:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
    Logger::Severity.constants.each do |severity|
          ^^^^^^^^^^
	from /Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.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.2.5/lib/ruby/gems/3.2.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.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/logger_silence.rb:5:in `<top (required)>'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support/logger.rb:3:in `<top (required)>'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8/lib/active_support.rb:29:in `<top (required)>'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods.rb:7:in `<top (required)>'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from <internal:/Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
	from /Users/vagrant/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/bin/pod:36:in `<top (required)>'
	from /Users/vagrant/.asdf/installs/ruby/3.2/bin/pod:25:in `load'
	from /Users/vagrant/.asdf/installs/ruby/3.2/bin/pod:25:in `<main>'

Reproducer

https://github.com/guhcostan/build-ios-error-react-native

Screenshots and Videos

No response

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.75.4. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Jan 16, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@Zlatov
Copy link

Zlatov commented Jan 18, 2025

$ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
$ rails _6.1.7.4_ new test_app
/home/someuser/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.4/lib/active_support/logger_thread_safe_level.rb:16:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

    Logger::Severity.constants.each do |severity|
    ^^^^^^

@Guoxweii
Copy link

I have the same error

@Guoxweii
Copy link

Guoxweii commented Jan 18, 2025

https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror

@daviddamilola
Copy link

I have the same error

@cipolleschi
Copy link
Contributor

The problem is that Ruby released a broken gem for concurrent-ruby on Thursday.
We already fixed it on main but we haven't had the time to release new react native patches for all our versions.

To unblock you, you can modify your Gemfiles like shown in this commit:

198adb4

@shuaibzahda
Copy link

added this to the Gemfile and it fixed it.

gem 'concurrent-ruby', '1.3.4'
Taken from the stackoverflow thread mentioned by @Guoxweii

@cipolleschi
Copy link
Contributor

@shuaibzahda it is the commit I linked above...

@cortinico cortinico added the Resolution: Answered When the issue is resolved with a simple answer label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Resolution: Answered When the issue is resolved with a simple answer
Projects
None yet
Development

No branches or pull requests

8 participants