Defect #42113
closedRedmine 5.x not starting with ActiveSupport Logger error
0%
Description
When I try to start using the 5.1-stable branch on GitHub, it does not start with the following issue.
https://github.com/rails/rails/issues/54272
https://github.com/rails/rails/pull/54264
Files
Related issues
Updated by Mizuki ISHIKAWA 2 days ago
I was able to reproduce a problem that looked like that.
I switched to 5.1-stable and then deleted the Gemfile.lock in my development environment and did a bundle install.
/usr/local/lib/ruby/gems/3.2.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) Logger::Severity.constants.each do |severity| ^^^^^^^^^^ from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>' from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger_silence.rb:5:in `<top (required)>' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from /usr/local/lib/ruby/gems/3.2.0/gems/activesupport-6.1.7.10/lib/active_support.rb:29:in `<top (required)>' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from /usr/local/lib/ruby/gems/3.2.0/gems/railties-6.1.7.10/lib/rails/command.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from /usr/local/lib/ruby/gems/3.2.0/gems/railties-6.1.7.10/lib/rails/commands.rb:3:in `<top (required)>' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require' from bin/rails:4:in `<main>'
Updated by Mizuki ISHIKAWA 2 days ago
I have confirmed that the issue can be resolved by making the following changes, as referenced in https://github.com/rails/rails/pull/54264#issuecomment-2596149819 .
diff --git a/Gemfile b/Gemfile
index 290011946..68f40f2bb 100644
--- a/Gemfile
+++ b/Gemfile
@@ -15,6 +15,7 @@ gem 'i18n', '~> 1.14.1'
gem 'rbpdf', '~> 1.21.3'
gem 'addressable'
gem 'rubyzip', '~> 2.3.0'
+gem 'concurrent-ruby', '< 1.3.5'
# Ruby Standard Gems
gem 'csv', '~> 3.2.6'
Although this is not a Redmine-specific issue, Rails 6.1 has already reached EOL. If Redmine 5.1 is to continue being supported, it might be necessary for the Redmine project to address this problem on its end.
Updated by Mizuki ISHIKAWA 2 days ago
This issue does not reproduce on Redmine 6.0-stable or trunk
Updated by Go MAEDA 2 days ago
Another workaround:
Index: config/boot.rb
===================================================================
--- config/boot.rb (revision 23435)
+++ config/boot.rb (working copy)
@@ -4,3 +4,5 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
+
+require 'logger'
Updated by Mizuki ISHIKAWA 2 days ago
Updated by Go MAEDA 2 days ago
- File 42113.diff 42113.diff added
- Category set to Rails support
I will commit the attached patch in the 5.1-stable branch.
Updated by Abe Tomoaki 2 days ago
Thanks for the quick response.
I forgot to mention the 5.0-stable branch, sorry.
I get the same error on the 5.0-stable branch, will it be committed on there too?
Updated by Holger Just 1 day ago
- Has duplicate Defect #42120: NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger - Redmine-5.x added
Updated by Go MAEDA 1 day ago
Abe Tomoaki wrote in #note-9:
I forgot to mention the 5.0-stable branch, sorry.
I get the same error on the 5.0-stable branch, will it be committed on there too?
Although Redmine 5.0 is no longer maintained, this issue is critical as it prevents Redmine from starting. Therefore, I have committed the fix in r23444.
Updated by Jobin J about 15 hours ago
Thank you for the fix. Can you please confirm that this issue is fixed in any of the official download links, such as 5.1.5 or 5.0.10?
I spent the whole day yesterday trying to run Redmine on different operating systems and logged ticket #42120.