Skip to content
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

Ruby SDK requires Rack to be installed #654

Open
RyanGWU82 opened this issue Nov 17, 2022 · 0 comments
Open

Ruby SDK requires Rack to be installed #654

RyanGWU82 opened this issue Nov 17, 2022 · 0 comments
Labels
ruby Issues related to our Ruby SDK

Comments

@RyanGWU82
Copy link
Contributor

The Ruby SDK requires the Rack HTTP web server to be installed. There are two problems here: First, rack isn't specified in the Gemfile. Second, rack is required even if you're just using readme/webhook which doesn't directly depend on Rack.

I think the second issue is because when you require readme/webhook, it loads lib/readme/webhook.rb. The first line of that file is:

require 'readme/metrics'

This loads the entire readme/metrics package, and that needs Rack. But I think we have to do it this way so that we can "monkeypatch" the Readme module.

Two solutions that I think will help with all this:

  1. Create some other overarching file that defines the Readme module, so that readme/webhook never needs to load readme/metrics. (My Ruby is pretty rusty so I'm not sure whether this even makes sense, but I think there's probably something we can do with an extra layer of indirection…)
  2. Add rack to the Gemfile.
@erunion erunion added ruby Issues related to our Ruby SDK and removed area:ruby labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Issues related to our Ruby SDK
Projects
None yet
Development

No branches or pull requests

2 participants