Skip to content

Commit e99aa34

Browse files
Merge pull request rails#47885 from zzak/rack-3-rackup-server
Fix Rack::Deprecation warning which causes this test to fail
2 parents 7c208c7 + 05e9464 commit e99aa34

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

railties/lib/rails/commands/server/server_command.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
require "active_support/core_ext/string/filters"
77
require "rails/dev_caching"
88
require "rails/command/environment_argument"
9-
require "rack/server"
9+
require "rails/rackup/server"
1010

1111
module Rails
12-
class Server < ::Rack::Server
12+
class Server < Rackup::Server
1313
class Options
1414
def parse!(args)
1515
Rails::Command::ServerCommand.new([], args).server_options

railties/lib/rails/rackup/server.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
# :enddoc:
4+
5+
module Rails
6+
module Rackup
7+
begin
8+
require "rackup/server"
9+
Server = ::Rackup::Server
10+
rescue LoadError
11+
require "rack/server"
12+
Server = ::Rack::Server
13+
end
14+
end
15+
end

0 commit comments

Comments
 (0)