-
Notifications
You must be signed in to change notification settings - Fork 175
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
`require': cannot load such file -- typhoeus #1633
Comments
Oh, what you're saying is that even though you only plan on using Svix for webhook verification, it's still causing issues for you? I don't think it was reintroduced (have we even made any changes to the lib since?), but maybe the previous solution wasn't sufficient? Any idea what we should do to fix it? I don't know Ruby myself, so not sure what's the right solution here. Though how do we make that import path that you shared be optional? (so it doesn't import api_client unless you use it). |
Just chiming in that I'm having the exact same issue -- just making a note that yes, adding |
lib/svix/api_client.rb is not in the repo, it is generated by this: svix-webhooks/ruby/templates/api_client_typhoeus_partial.mustache Lines 67 to 76 in e1196a9
so the error message should be different from what @adrian-gomez is experiencing looking at the published gem:
looking at we have this at the top require 'date'
require 'json'
require 'logger'
require 'tempfile'
require 'time'
require 'typhoeus' so, something in the openapi-generator stack is adding that to the top even though it's not in the template. |
Thanks @jjb! We are in the process of changing how the Ruby code is generated anyway, so I think it'll probably fix itself in the next 7-10 days. Is there a way to make the |
need to someone make this optional svix-webhooks/ruby/lib/svix.rb Line 82 in e1196a9
a silly way to do that is only require it if typhoeus is installed... may find yourself with confused users |
OK, I think we'll just wait until the Ruby lib overhaul @svix-mman and @svix-jplatte are working on. |
Bug Report
Version
ruby svix-1.56.0
Platform
OSx
Description
It seems the hard requirement for
typhoeus
was reintroduced by mistake (?)The PR #1486 made it optional but I just tried to add
svix
to our project and got the error in the title when trying to run any rails command.The require comes from
lib/svix.rb#L82
->lib/svix/api_client.rb#L18
We only plan to validate webhooks so we don't want to the extra dependency if we can avoid it.
The text was updated successfully, but these errors were encountered: