Skip to content

Commit

Permalink
manually overwrite "rack" to be v2
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangohjw committed Jul 5, 2024
1 parent ed37363 commit 0f066f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/generator_specs/generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@
Bundler.with_unbundled_env do
if RUBY_VERSION.start_with?("2.")
# Bundler's version compatible with Ruby 2 does not support "--path" switch
# Overwriting "rack" version due to unless Rack::Handler::Puma.respond_to?(:config) in Capybara gem v3.39.2 or earlier.
# Issue resolved in Capybara v3.40.0, but Ruby 2.7 support dropped; last compatible version is v3.39.2.
# Ref: https://github.com/shakacode/shakapacker/issues/498
sh_in_dir({}, BASE_RAILS_APP_PATH, %(
gem update bundler
echo 'gem "shakapacker", :path => "#{GEM_ROOT}"' >> Gemfile
echo 'gem "rack", "< 3.0.0"' >> Gemfile
bundle install
))
else
Expand Down

0 comments on commit 0f066f2

Please sign in to comment.