ruby-sdk
ruby-sdk copied to clipboard
Replace 'rackup' with 'rack' in server file
Motivation and Context
Running this example with Ruby 3.4.5 the following does not work:
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.
How Has This Been Tested?
I was running this in development mode to help me understand the use of the gem and ran into this issue.
Breaking Changes
There shouldn't be any breaking changes
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation update
Checklist
- [x] I have read the MCP Documentation
- [ ] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed
Additional context
Hm, the issue doesn't reproduce with the following steps. First, start the server in a terminal:
$ cd path/to/ruby-sdk
$ ruby examples/streamable_http_server.rb
Then, in another terminal, run the client:
$ cd path/to/ruby-sdk
$ ruby examples/streamable_http_client.rb
Can you share the steps to reproduce the error reported in this PR?