Skip to content

Ruby SDK requires Rack to be installed #654

@RyanGWU82

Description

@RyanGWU82

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    rubyIssues related to our Ruby SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions