httpi: Installing Twitter Gem breaks Savon due to HTTPI LOAD_ORDER preferring http over net_http
Using savon (2.11.1) Using httpi (2.4.1) Using twitter (5.14.0) Using http (0.6.4)
I just installed the twitter
Gem (https://github.com/sferik/twitter) which has http
Gem as dependency while using the savon
Gem .
HTTPI then preferred http
over the working net_http
(this seems to be the default in Rails) in the LOAD_ORDER which then breaks Savon’s requests with following error:
NoMethodError (undefined method
headers’ for #HTTP::Client:0xbd8ab91c):`
After installing httpclient
everything worked fine again due to the LOAD_ORDER
https://github.com/savonrb/httpi/blob/master/lib/httpi/adapter.rb#L16
This seems to be related to https://github.com/savonrb/savon/issues/488
The error messages are not very clear and the stacktrace for debugging was really non-existing but pointing to the Savon API calls. I think this ought to be remedied in some way.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (8 by maintainers)
@Connorhd I think if part of your code plays such an important role as to be a showstopper, maybe it is time for savon to decide on one http client and be done with it, rather than supporting all http clients and trying to figure out a LOAD_ORDER of the least client that is going to break.