From b5cf59423a7a26593a7bdf414ac841236bdbdfd7 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev <156273877+p-datadog@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:45:40 -0500 Subject: [PATCH] Work around missing logger dependency in Rails 6.1 and 7.0 (#4298) Co-authored-by: Oleg Pudeyev --- integration/apps/rails-seven/Gemfile | 11 +++++++++++ integration/apps/rails-six/Gemfile | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/integration/apps/rails-seven/Gemfile b/integration/apps/rails-seven/Gemfile index d28e118b82c..129193bcb71 100644 --- a/integration/apps/rails-seven/Gemfile +++ b/integration/apps/rails-seven/Gemfile @@ -49,3 +49,14 @@ end # Gems no longer included in Ruby 3.4 gem 'bigdecimal' gem 'mutex_m' + +# concurrent-ruby 1.3.5 removed dependency on logger, see: +# https://github.com/ruby-concurrency/concurrent-ruby/commit/d7ce956dacd0b772273d39b8ed31a30cff7ecf38 +# Unfortunately this broke Rails because ActiveSupport used Logger +# before requiring logger. +# Since the failure happens rather early in rails bootstrapping, +# patching it is difficult, thus downgrade concurrent-ruby. +# The issue is fixed in 7-0-stable and should be shipped in the release +# after 7.0.8.7, at which point the pin of concurrent-ruby should be removed. +# See https://github.com/rails/rails/issues/54263 +gem 'concurrent-ruby', '1.3.4' diff --git a/integration/apps/rails-six/Gemfile b/integration/apps/rails-six/Gemfile index 7056563881a..226f27293ec 100644 --- a/integration/apps/rails-six/Gemfile +++ b/integration/apps/rails-six/Gemfile @@ -105,3 +105,13 @@ end # Gem no longer included in Ruby 3.4 gem 'mutex_m' + +# concurrent-ruby 1.3.5 removed dependency on logger, see: +# https://github.com/ruby-concurrency/concurrent-ruby/commit/d7ce956dacd0b772273d39b8ed31a30cff7ecf38 +# Unfortunately this broke Rails because ActiveSupport used Logger +# before requiring logger. +# Since the failure happens rather early in rails bootstrapping, +# patching it is difficult, thus downgrade concurrent-ruby. +# The issue affects Rails 6.1 where apparently it will be never fixed +# (unlike Rails 7.0 which is fixed in https://github.com/rails/rails/issues/54263). +gem 'concurrent-ruby', '1.3.4'