capybara icon indicating copy to clipboard operation
capybara copied to clipboard

Rails 7.2.1.2 error when running tests

Open jason-hobbs opened this issue 4 months ago • 1 comments

I just updated to Rails 7.2.1.2 which included an update to rackup 1.0.1. My app runs fine but when trying to run tests with the latest Capybara I am getting:

`#<Thread:0x0000000179b79970 /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/capybara-3.40.0/lib/capybara/server.rb:76 run> terminated with exception (report_on_exception is true): /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/puma-6.4.3/lib/rack/handler/puma.rb:126:in "module:Handler": undefined method "register" for module Rackup::Handler (NoMethodError)

  register :puma, Puma
  ^^^^^^^^
    from /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/puma-6.4.3/lib/rack/handler/puma.rb:120:in "<module:Rackup>"
    from /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/puma-6.4.3/lib/rack/handler/puma.rb:119:in "<top (required)>"
    from /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/3.3.0/bundled_gems.rb:75:in "require"
    from /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/3.3.0/bundled_gems.rb:75:in "block (2 levels) in replace_require"
    from /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in "require"
    from /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/capybara-3.40.0/lib/capybara/registrations/servers.rb:27:in "block in <top (required)>"
    from /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/capybara-3.40.0/lib/capybara/config.rb:64:in "block in server="
    from /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/capybara-3.40.0/lib/capybara/server.rb:77:in "block in boot"

/Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/puma-6.4.3/lib/rack/handler/puma.rb:6: warning: already initialized constant Puma::RackHandler::DEFAULT_OPTIONS /Users/jasonhobbs/.local/share/mise/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/puma-6.4.3/lib/rack/handler/puma.rb:6: warning: previous definition of DEFAULT_OPTIONS was here`

jason-hobbs avatar Oct 24 '24 05:10 jason-hobbs