From 823b41b6e4b0b42fb3cde1c29a0b55a3f19a5951 Mon Sep 17 00:00:00 2001 From: William Dewey Date: Thu, 16 Jan 2025 12:57:19 -0600 Subject: [PATCH 1/2] update gems, remove webpacker, and fix rails bug fixes #37 --- Gemfile | 5 ++++- Gemfile.lock | 41 +++++++++++++++++------------------------ 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/Gemfile b/Gemfile index 63ebc93..496967d 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem 'sassc-rails', '~> 2.1' # gem 'mini_racer', platforms: :ruby # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker -gem 'webpacker', '~> 5.0' +#gem 'webpacker', '~> 5.0' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks #gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder @@ -34,6 +34,9 @@ gem 'jbuilder', '~> 2.7' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.4', require: false +# Fix for uninitialized constant Logger, see https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror +gem 'concurrent-ruby', '1.3.4' + group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] diff --git a/Gemfile.lock b/Gemfile.lock index 1e786ff..5856fef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/cdrh/orchid - revision: 079faba82a6851e8bd95752647843af8812d99d3 + revision: 31a550e912bd2bb66dfbb8189a7f109b721d7200 branch: local_testing specs: orchid (3.1.1) @@ -93,9 +93,9 @@ GEM concurrent-ruby (1.3.4) crass (1.0.6) date (3.4.1) - erubi (1.13.0) + erubi (1.13.1) execjs (2.10.0) - ffi (1.17.0) + ffi (1.17.1) globalid (1.2.1) activesupport (>= 6.1) i18n (1.14.6) @@ -110,8 +110,8 @@ GEM listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - logger (1.6.2) - loofah (2.23.1) + logger (1.6.5) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -126,7 +126,7 @@ GEM mini_portile2 (2.8.8) minitest (5.25.4) msgpack (1.7.5) - net-imap (0.5.1) + net-imap (0.5.5) date net-protocol net-pop (0.1.2) @@ -136,7 +136,7 @@ GEM net-smtp (0.5.0) net-protocol nio4r (2.7.4) - nokogiri (1.16.8) + nokogiri (1.18.1) mini_portile2 (~> 2.8.2) racc (~> 1.4) public_suffix (6.0.1) @@ -146,9 +146,7 @@ GEM rack (2.2.10) rack-mini-profiler (2.3.4) rack (>= 1.2.0) - rack-proxy (0.7.7) - rack - rack-test (2.1.0) + rack-test (2.2.0) rack (>= 1.3) rails (6.1.7.10) actioncable (= 6.1.7.10) @@ -169,7 +167,7 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.1) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) railties (6.1.7.10) @@ -182,9 +180,9 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - regexp_parser (2.9.3) - rexml (3.3.9) - rubyzip (2.3.2) + regexp_parser (2.10.0) + rexml (3.4.0) + rubyzip (2.4.1) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) @@ -199,7 +197,6 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - semantic_range (3.1.0) spring (4.2.1) sprockets (4.2.1) concurrent-ruby (~> 1.0) @@ -211,8 +208,8 @@ GEM sqlite3 (1.7.3) mini_portile2 (~> 2.8.0) thor (1.3.2) - tilt (2.4.0) - timeout (0.4.2) + tilt (2.6.0) + timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) web-console (4.2.1) @@ -224,13 +221,9 @@ GEM nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0) - webpacker (5.4.4) - activesupport (>= 5.2) - rack-proxy (>= 0.6.1) - railties (>= 5.2) - semantic_range (>= 2.3.0) websocket (1.2.11) - websocket-driver (0.7.6) + websocket-driver (0.7.7) + base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) @@ -245,6 +238,7 @@ DEPENDENCIES bootstrap-sass (~> 3.4.1) byebug capybara (>= 3.26) + concurrent-ruby (= 1.3.4) jbuilder (~> 2.7) jquery-rails (~> 4.3) listen (~> 3.3) @@ -259,7 +253,6 @@ DEPENDENCIES tzinfo-data web-console (>= 4.1.0) webdrivers - webpacker (~> 5.0) RUBY VERSION ruby 3.1.6p260 From 1cad85bd5a490eb45ef58525328199e3ade10dcb Mon Sep 17 00:00:00 2001 From: Greg Tunink Date: Fri, 24 Jan 2025 16:32:12 -0600 Subject: [PATCH 2/2] Revert concurrent-ruby gem downgrade; fix logger dependency Bad Stack Overflow advice "fixed" this issue, but with other very unwanted consequences This fix is much better and mirrors how Rails itself fixed the issue --- Gemfile | 3 --- Gemfile.lock | 11 +++++------ config/boot.rb | 1 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 496967d..d7cfe83 100644 --- a/Gemfile +++ b/Gemfile @@ -34,9 +34,6 @@ gem 'jbuilder', '~> 2.7' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.4', require: false -# Fix for uninitialized constant Logger, see https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror -gem 'concurrent-ruby', '1.3.4' - group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] diff --git a/Gemfile.lock b/Gemfile.lock index 5856fef..2ffd672 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -90,7 +90,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - concurrent-ruby (1.3.4) + concurrent-ruby (1.3.5) crass (1.0.6) date (3.4.1) erubi (1.13.1) @@ -98,7 +98,7 @@ GEM ffi (1.17.1) globalid (1.2.1) activesupport (>= 6.1) - i18n (1.14.6) + i18n (1.14.7) concurrent-ruby (~> 1.0) jbuilder (2.13.0) actionview (>= 5.0.0) @@ -136,7 +136,7 @@ GEM net-smtp (0.5.0) net-protocol nio4r (2.7.4) - nokogiri (1.18.1) + nokogiri (1.18.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) public_suffix (6.0.1) @@ -191,7 +191,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt - selenium-webdriver (4.27.0) + selenium-webdriver (4.28.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) @@ -238,7 +238,6 @@ DEPENDENCIES bootstrap-sass (~> 3.4.1) byebug capybara (>= 3.26) - concurrent-ruby (= 1.3.4) jbuilder (~> 2.7) jquery-rails (~> 4.3) listen (~> 3.3) @@ -258,4 +257,4 @@ RUBY VERSION ruby 3.1.6p260 BUNDLED WITH - 2.3.27 + 2.5.23 diff --git a/config/boot.rb b/config/boot.rb index 3cda23b..65bddf3 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,5 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. +require "logger" # Fix concurrent-ruby removing logger dependency Rails is missing require "bootsnap/setup" # Speed up boot time by caching expensive operations.