-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rack::Handler is deprecated
warning when using Rails 7.1 beta and Rack 3
#2705
Comments
Before, using capybara on a project with rack 3 would emit the following warning: > Rack::Handler is deprecated and replaced by Rackup::Handler This was because the capybara server registration code for `:puma` was referencing the deprecated `Rack::Handler::Puma` constant. Fix by detecting and preferring the `Rackup::Handler::Puma` constant, if present. Fixes teamcapybara#2705
Thanks for doing a PR! If you came here by Googling the warning now that Rails 7.1 is released, you could just drop this in if Rails.env.test?
require 'rackup'
module Rack
Handler = ::Rackup::Handler
end
end |
edtect and prefer `Rackup::Handler::Puma` if present. Fixes #2705
This is great! Can we get a release or tag generated to include this? |
So basically all that needs to happen to get this error to go away, is for Capybara to release a new version via a tag? looks like last one was from june |
Capybara needs to be bumped: teamcapybara/capybara#2705 Until then, we can simply link to the latest commit on GitHub.
Capybara needs to be bumped: teamcapybara/capybara#2705 Until then, we can simply link to the latest commit on GitHub.
Meta
Using the following system test case config:
Expected Behavior
Capybara can be used with Rails 7.1 and Rack 3 without warnings.
Actual Behavior
The following warning is printed to stderr:
Steps to reproduce
Upgrade a Rails app to Rails 7.1.0.beta1 and run a system test that uses Capybara.
Workaround
The warning goes away if Rack is pinned at 2.x. (Rails 7.1 beta works with Rack 2 and Rack 3.)
The text was updated successfully, but these errors were encountered: