Skip to content

Commit c39428e

Browse files
Replace 'rackup' with 'rack' in server file
Running this example with Ruby 3.4.5 the following does not work: ```ruby Rackup::Handler.get("puma").run(rack_app, Port: 9393, Host: "0.0.0.0") ``` It returns the following error message: `uninitialized constant Rackup::Handler (NameError)` To resolve this I just required Rack and changed Rackup to Rack. Then things worked fine.
1 parent 400a56e commit c39428e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/streamable_http_server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
44
require "mcp"
5-
require "rackup"
5+
require "rack"
66
require "json"
77
require "logger"
88

@@ -168,4 +168,4 @@ def call(message:, delay: 0)
168168
MESSAGE
169169

170170
# Start the server
171-
Rackup::Handler.get("puma").run(rack_app, Port: 9393, Host: "localhost")
171+
Rack::Handler.get("puma").run(rack_app, Port: 9393, Host: "localhost")

0 commit comments

Comments
 (0)