Project

General

Profile

Actions

Patch #37867

closed

Limit puma < 6.0.0 to avoid system test error

Added by Ko Nagase about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Gems support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Recently, system test fails with the following error.

% bundle exec rails test:system
Run options: --seed 40281

# Running:

#<Thread:0x000000011134ded0 /Users/sanak/Build/rb/redmine/vendor/bundle/ruby/3.1.0/gems/capybara-3.36.0/lib/capybara/server.rb:76 run> terminated with exception (report_on_exception is true):
/Users/sanak/Build/rb/redmine/vendor/bundle/ruby/3.1.0/gems/capybara-3.36.0/lib/capybara/registrations/servers.rb:32:in `block in <top (required)>': undefined method `stdio' for Puma::Events:Class (NoMethodError)

  events = conf.options[:Silent] ? ::Puma::Events.strings : ::Puma::Events.stdio
                                                                          ^^^^^^
    from /Users/sanak/Build/rb/redmine/vendor/bundle/ruby/3.1.0/gems/capybara-3.36.0/lib/capybara/config.rb:64:in `block in server='
    from /Users/sanak/Build/rb/redmine/vendor/bundle/ruby/3.1.0/gems/capybara-3.36.0/lib/capybara/server.rb:77:in `block in boot'

From the following links,

limiting puma < 6.0.0 seems to be better, because capybara version is specified in Gemfile.

I upload a simple patch to limit puma < 6.0.0, so reviewing it is helpful.


Files


Related issues

Related to Redmine - Patch #38135: Allow use of Puma 6.0.0 or laterClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA about 2 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version set to 4.2.9

Committed the patch.

Thank you for reporting and fixing the issue.

Actions #2

Updated by Alexander Meindl almost 2 years ago

This is fixed in Version 3.38.0 of capybara: https://github.com/teamcapybara/capybara/blob/master/History.md#version-3380
We should remove this restriction of puma again.

Actions #3

Updated by Ko Nagase almost 2 years ago

Alexander Meindl wrote:

This is fixed in Version 3.38.0 of capybara: https://github.com/teamcapybara/capybara/blob/master/History.md#version-3380
We should remove this restriction of puma again.

Okay, sure.

I confirmed that the system test didn't crash with the following patch (with #37558 patch (+webdriver=5.2.0)) on my M1 macOS environment.

--- a/Gemfile
+++ b/Gemfile
@@ -97,9 +97,8 @@ group :test do
   gem 'simplecov', '~> 0.21.2', :require => false
   gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
   # For running system tests
-  # TODO: Remove version specification once Capybara supports Puma 6
-  gem 'puma', '< 6.0.0'
-  gem 'capybara', '~> 3.36.0'
+  gem 'puma'
+  gem 'capybara', '~> 3.38.0'
   gem "selenium-webdriver", "~> 3.142.7" 
   gem 'webdrivers', '4.6.1', require: false
   # RuboCop

Actions #4

Updated by Go MAEDA almost 2 years ago

Redmine still supports Ruby 2.6, but the patch 0001-Remove-puma-6.0.0-restriction.patch causes a compatibility issue with Ruby 2.6 because Capybara 3.37 and later requires Ruby 2.7.0 or later.

The attached patch solves the problem when using Ruby 2.6.

Actions #5

Updated by Ko Nagase almost 2 years ago

Go MAEDA wrote:

Redmine still supports Ruby 2.6, but the patch 0001-Remove-puma-6.0.0-restriction.patch causes a compatibility issue with Ruby 2.6 because Capybara 3.37 and later requires Ruby 2.7.0 or later.

The attached patch solves the problem when using Ruby 2.6.

Sorry, I missed the capybara side Ruby version condition...
https://github.com/teamcapybara/capybara/blob/master/capybara.gemspec#L11

Thanks for the fix!

Actions #6

Updated by Go MAEDA almost 2 years ago

I have opened a new issue. Please use #38135 for further discussion.

Actions #7

Updated by Go MAEDA almost 2 years ago

  • Related to Patch #38135: Allow use of Puma 6.0.0 or later added
Actions

Also available in: Atom PDF