Skip to content

Commit

Permalink
Workaround Rails failure to properly require logger prior to Rails 7.1
Browse files Browse the repository at this point in the history
By using old version of concurrent-ruby that require'd logger itself and masked bug. Tried to workaround in other ways like adding 'logger' explicitly to gemfile or gemspec, but had a lot of mysterious trouble getting that to work.
  • Loading branch information
jrochkind committed Jan 21, 2025
1 parent 358a4a9 commit 78a8d18
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
# bug in Rails pre-7.0 does not require 'logger' when it should....
# concurrent-ruby prior to 1.3.5 masked the problem, and the easiest
# way for us to get CI to work for such Rails is to use an older concurrent-ruby
# version, other attempts to workaround were not succesful.
#
#
# Rails will not be releasing a fix for Rails prior to 7.1.0
# to release a fix. https://github.com/rails/rails/pull/54264
#

appraise "rails-60" do
gem "rails", "~> 6.0.0"
gem "concurrent-ruby", "< 1.3.5"
end

appraise "rails-61" do
gem "rails", "~> 6.1.0"
gem "concurrent-ruby", "< 1.3.5"
end

appraise "rails-70" do
gem "rails", "~> 7.0.0"
gem "concurrent-ruby", "< 1.3.5"
end

appraise "rails-71" do
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_60.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "rails", "~> 6.0.0"
gem "concurrent-ruby", "< 1.3.5"

group :development, :test do
gem "rspec-rails", ">= 5.0", "< 7"
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_61.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "rails", "~> 6.1.0"
gem "concurrent-ruby", "< 1.3.5"

group :development, :test do
gem "rspec-rails", ">= 5.0", "< 7"
Expand Down
1 change: 1 addition & 0 deletions gemfiles/rails_70.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "rails", "~> 7.0.0"
gem "concurrent-ruby", "< 1.3.5"

group :development, :test do
gem "rspec-rails", ">= 5.0", "< 7"
Expand Down

0 comments on commit 78a8d18

Please sign in to comment.