-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Rails 7.0.8 fails to create an app with most recent concurrent-ruby version #54260
Comments
Try the But, since 0f5e7a6 is not part of it, you may still need to add a manual |
This is fixed in Rails 7.1 through this commit: This commit is not part of the |
Due to a mismatch in expectations between the latest version of `concurrent-ruby` and older versions of Rails, `logger` must be required before other dependencies are required: rails/rails#54260
Many existing Ruby ActiveRecord applications have been broken by rails/rails#54260. This also includes the tests and samples for PGAdapter. This workaround makes sure that Logger is required before running the test/sample.
Many existing Ruby ActiveRecord applications have been broken by rails/rails#54260. This also includes the tests and samples for PGAdapter. This workaround makes sure that Logger is required before running the test/sample.
Many existing Ruby ActiveRecord applications have been broken by rails/rails#54260. This also includes the tests and samples for PGAdapter. This workaround makes sure that Logger is required before running the test/sample.
Restrict 'concurrent-ruby' to '< 1.3.5' because of rails/rails#54260
Restrict 'concurrent-ruby' to '< 1.3.5' because of rails/rails#54260
To address compatibility issues with Rails 7.0, this commit locks `concurrent-ruby` gem to version 1.3.4. This change is necessary to prevent an uninitialized constant error related to `ActiveSupport::LoggerThreadSafeLevel::Logger`, as documented in issue rails/rails#54260. By specifying this version, we ensure that our CI integration specs pass consistently, providing a stable development and testing environment. This measure will remain in place until the integration tests upgrade to Rails 7.1, which involves significant changes that require careful consideration and testing.
To address compatibility issues with Rails 7.0, this commit locks `concurrent-ruby` gem to version 1.3.4. This change is necessary to prevent an uninitialized constant error related to `ActiveSupport::LoggerThreadSafeLevel::Logger`, as documented in issue rails/rails#54260. By specifying this version, we ensure that our CI integration specs pass consistently, providing a stable development and testing environment. This measure will remain in place until the integration tests upgrade to Rails 7.1, which involves significant changes that require careful consideration and testing.
To address compatibility issues with Rails 7.0, this commit locks `concurrent-ruby` gem to version 1.3.4. This change is necessary to prevent an uninitialized constant error related to `ActiveSupport::LoggerThreadSafeLevel::Logger`, as documented in issue rails/rails#54260. By specifying this version, we ensure that our CI integration specs pass consistently, providing a stable development and testing environment. This measure will remain in place until the integration tests upgrade to Rails 7.1, which involves significant changes that require careful consideration and testing.
To address compatibility issues with Rails 7.0, this commit locks `concurrent-ruby` gem to version 1.3.4. This change is necessary to prevent an uninitialized constant error related to `ActiveSupport::LoggerThreadSafeLevel::Logger`, as documented in issue rails/rails#54260. By specifying this version, we ensure that our CI integration specs pass consistently, providing a stable development and testing environment. This measure will remain in place until the integration tests upgrade to Rails 7.1, which involves significant changes that require careful consideration and testing.
…el::Logger rails/rails#54260 concurrent-ruby 1.3.5 introduces a change which reveals a bug in activerecord 6.1 and 7.0, breaking specs
…el::Logger rails/rails#54260 concurrent-ruby 1.3.5 introduces a change which reveals a bug in activerecord 6.1 and 7.0, breaking specs
…el::Logger rails/rails#54260 concurrent-ruby 1.3.5 introduces a change which reveals a bug in activerecord 6.1 and 7.0, breaking specs
…el::Logger rails/rails#54260 concurrent-ruby 1.3.5 introduces a change which reveals a bug in activerecord 6.1 and 7.0, breaking specs
…eadSafeLevel::Logger The upgrade of gem concurrent-ruby to 1.3.5 made a bug in activesupport visible. The bug seems to be fixed for rails 7.1 and 7.2 but not 7.0 which gitlab uses. rails/rails#49372 rails/rails#54260 So we import the Logger to fix the error message: bundler: failed to load command: puma (/usr/local/bin/puma) /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/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 /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_silence.rb:5:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support.rb:29:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/all.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils.rb:4:in `<top (required)>' from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils/all.rb:3:in `require_relative' from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils/all.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/www/gitlab/lib/gitlab/cluster/lifecycle_events.rb:3:in `<top (required)>' from /usr/local/www/gitlab/config/puma.rb:38:in `require_relative' from /usr/local/www/gitlab/config/puma.rb:38:in `_load_from' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/dsl.rb:135:in `instance_eval' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/dsl.rb:135:in `_load_from' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `block in load' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `each' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `load' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/launcher.rb:56:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/cli.rb:66:in `new' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/cli.rb:66:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/bin/puma:8:in `new' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/bin/puma:8:in `<top (required)>' from /usr/local/bin/puma:25:in `load' from /usr/local/bin/puma:25:in `<top (required)>' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:59:in `load' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:59:in `kernel_load' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:23:in `run' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:452:in `exec' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor.rb:538:in `dispatch' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:35:in `dispatch' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:29:in `start' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/exe/bundle:28:in `block in <top (required)>' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/exe/bundle:20:in `<top (required)>' from /usr/local/bin/bundle:25:in `load' from /usr/local/bin/bundle:25:in `<main>'
…eadSafeLevel::Logger The upgrade of gem concurrent-ruby to 1.3.5 made a bug in activesupport visible. The bug seems to be fixed for rails 7.1 and 7.2 but not 7.0 which gitlab uses. rails/rails#49372 rails/rails#54260 So we import the Logger to fix the error message: bundler: failed to load command: puma (/usr/local/bin/puma) /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/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 /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_silence.rb:5:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support.rb:29:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/all.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils.rb:4:in `<top (required)>' from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils/all.rb:3:in `require_relative' from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils/all.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require' from /usr/local/www/gitlab/lib/gitlab/cluster/lifecycle_events.rb:3:in `<top (required)>' from /usr/local/www/gitlab/config/puma.rb:38:in `require_relative' from /usr/local/www/gitlab/config/puma.rb:38:in `_load_from' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/dsl.rb:135:in `instance_eval' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/dsl.rb:135:in `_load_from' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `block in load' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `each' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `load' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/launcher.rb:56:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/cli.rb:66:in `new' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/cli.rb:66:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/bin/puma:8:in `new' from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/bin/puma:8:in `<top (required)>' from /usr/local/bin/puma:25:in `load' from /usr/local/bin/puma:25:in `<top (required)>' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:59:in `load' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:59:in `kernel_load' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:23:in `run' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:452:in `exec' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor.rb:538:in `dispatch' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:35:in `dispatch' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:29:in `start' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/exe/bundle:28:in `block in <top (required)>' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/exe/bundle:20:in `<top (required)>' from /usr/local/bin/bundle:25:in `load' from /usr/local/bin/bundle:25:in `<main>' (cherry picked from commit 7040041)
See rails/rails#54260 for context.
See rails/rails#54260 for context.
See rails/rails#54260 for context.
See rails/rails#54260 for context.
See rails/rails#54260 for context.
This can be removed once Rails 7.0 support is dropped. See rails/rails#54260
rails/rails#54263 rails/rails#54260 concurrent-ruby 1.3.5 changes this for Rails, because concurrent-ruby used to load the logger gem. 1.3.5 no longer does, and Rails needs it. This should be fixed by newer versions of Rails (include on the 7.0 series), but in the meantime, this fixes the issue. We should remove this require once we upgrade Rails. rails/rails#54264
Just cross-posting here, not sure who should handle this
ruby-concurrency/concurrent-ruby#1077
Release: https://github.com/ruby-concurrency/concurrent-ruby/releases/tag/v1.3.5
The text was updated successfully, but these errors were encountered: