前に見たことがないエラーにとっ捕まったため、状況をメモしておきます。
環境
- Ubuntu 24.04
- Ruby 3.2
何が起きているか
Redmineの検証のため、新たに5.1を立てています。
- SVNでチェックアウト
- DBなどを作成
- database.ymlにDB情報を追記
sudo -u www-data bundle exec rake generate_secret_token
実行後、
rake aborted!
NameError: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
Logger::Severity.constants.each do |severity|
^^^^^^^^^^
/home/www-data/hideout/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:16:in `<module:LoggerThreadSafeLevel>'
/home/www-data/hideout/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>'
/home/www-data/hideout/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/www-data/hideout/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger_silence.rb:5:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/www-data/hideout/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/logger.rb:3:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/www-data/hideout/vendor/bundle/ruby/3.2.0/gems/activesupport-6.1.7.10/lib/active_support.rb:29:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/www-data/hideout/vendor/bundle/ruby/3.2.0/gems/railties-6.1.7.10/lib/rails.rb:7:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/www-data/hideout/config/application.rb:5:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:38:in `require'
/home/www-data/hideout/Rakefile:5:in `<top (required)>'
/home/www-data/hideout/vendor/bundle/ruby/3.2.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)
が発生。そのため、DBマイグレーションも通らないという状況。
この問題はやっかいそうなので、まずは事象が発生したという事実だけメモをします。