I go this same error. The error is emitted by the rackup gem if using the older Rack::Server class instead of the renamed Rackup::Server class. This was part of Rack doing a bit of re-org and splitting off the rackup gem. See the upgrade guide for more info.
For me the source was an extension to the Rack::Server by rails_semantic_logger. For you it might be some other gem. How I found this was:
Run bundle info rackup to find where rackup is installed
At that location edit the lib/rack/server.rb file by putting warn caller prior to the warn line.
Run the application. Where you previously just got the warning you now get a whole backtrace making it easy to see who is referencing Rack::Server instead of Rackup::Server.
Follow up with the offending gem with a PR to help us all. (still on my todo list for rails_semantic_logger)
Don’t forget to remove puts caller from your installation of the rackup gem.
In my case this was caused by capybara/registrations/server.rb. It does not appear to be a major issue at the moment since Rackup redirects the request to Rackup::Handler. I wonder how long that will last?
If you would like to avoid the deprecation warnings while you await the next Capybara release (which should fix the issue), the following workaround did the trick:
if Rails.env.test?
require 'rackup'
module Rack
Handler = ::Rackup::Handler
end
end
F../Users/dorianmariefr/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
/Users/dorianmariefr/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
/Users/dorianmariefr/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/dorianmariefr/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
/Users/dorianmariefr/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/skylight-6.0.3/lib/skylight/probes.rb:166:in `require'
/Users/dorianmariefr/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/capybara-3.39.2/lib/capybara/registrations/servers.rb:31:in `block in <main>'
/Users/dorianmariefr/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/capybara-3.39.2/lib/capybara/config.rb:64:in `block in server='
/Users/dorianmariefr/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/capybara-3.39.2/lib/capybara/server.rb:77:in `block in boot'
Rack::Handler is deprecated and replaced by Rackup::Handler
doing unless Rack::Handler::Puma.respond_to?(:config) in lib/capybara/registrations/servers.rb:31
Also I prefer bundle show rackup (it shows just the path)