You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the recent switch to the llhttp native Ruby binding (#800), using the http gem in environments that rely on Bundler’s --standalone mode results in a LoadError when requiring the native extension. This is due to the way llhttp loads its native extension using require_relative, which fails when the extension is not located relative to the Ruby file (as is common in standalone or custom deployment setups).
The http gem now depends on llhttp instead of llhttp-ffi, which currently uses require_relative to load its native extension.
In some deployment setups (notably with bundle install --standalone), the compiled extension is not in the expected relative location, causing a LoadError.
Consider documenting this issue for users of the http gem until the fix is released in llhttp.
Optionally, add a compatibility note or version constraint for llhttp in the http gem’s dependencies to ensure users get the fixed version once released.
If possible, add a test or CI job for Bundler standalone mode to catch similar issues in the future. (I know this is kind of niche 🤷♂ )
Environment
bundler 2.4.22,http 5.3.0,lhttp 0.6.1Problem
After the recent switch to the
llhttpnative Ruby binding (#800), using thehttpgem in environments that rely on Bundler’s--standalonemode results in aLoadErrorwhen requiring the native extension. This is due to the way llhttp loads its native extension usingrequire_relative, which fails when the extension is not located relative to the Ruby file (as is common in standalone or custom deployment setups).Error example:
Analysis
httpgem now depends onllhttpinstead ofllhttp-ffi, which currently usesrequire_relativeto load its native extension.--standalone), the compiled extension is not in the expected relative location, causing aLoadError.llhttpgem: LoadError when requiring native extension with require_relative in Parser.rb bryanp/llhttp#33 and Do not use require_relative with native extension bryanp/llhttp#34.Suggested Action
llhttp.llhttpin thehttpgem’s dependencies to ensure users get the fixed version once released.