Closed
Conversation
We can't use Faraday v2 if we use the adapter in Typhoeus. typhoeus/typhoeus#582 It causes the following error: in `remove_method': method `call' not defined in Faraday::Adapter::Typhoeus (NameError) remove_method :call if method_defined? :call
Merged
Watson1978
added a commit
to Watson1978/ruby-zulip-client
that referenced
this pull request
Mar 9, 2026
This PR upgrades the faraday dependency from 1.x to 2.x and resolves
several breaking changes.
Currently, this library is running the test suite fails with a
`NameError` because the older `typhoeus` gem attempts to modify
Faraday's internal adapter classes using a legacy structure that is no
longer compatible with Faraday 2.x.
```
$ bundle exec rake test
/home/watson/.rbenv/versions/3.4.8/bin/ruby -w -I"lib:test" /home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb "test/test_client.rb"
/home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/typhoeus-1.1.2/lib/typhoeus/adapters/faraday.rb:28:in 'Module#remove_method': method 'call' not defined in Faraday::Adapter::Typhoeus (NameError)
remove_method :call if method_defined? :call
^^^^^^^^^^^^^
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/typhoeus-1.1.2/lib/typhoeus/adapters/faraday.rb:28:in '<class:Typhoeus>'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/typhoeus-1.1.2/lib/typhoeus/adapters/faraday.rb:21:in '<class:Adapter>'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/typhoeus-1.1.2/lib/typhoeus/adapters/faraday.rb:4:in '<module:Faraday>'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/typhoeus-1.1.2/lib/typhoeus/adapters/faraday.rb:3:in '<top (required)>'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from /home/watson/src/ruby-zulip-client/lib/zulip/client.rb:5:in '<top (required)>'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from /home/watson/src/ruby-zulip-client/test/helper.rb:4:in '<top (required)>'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from /home/watson/src/ruby-zulip-client/test/test_client.rb:1:in '<top (required)>'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:21:in 'block in <main>'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:6:in 'Array#select'
from /home/watson/.rbenv/versions/3.4.8/lib/ruby/gems/3.4.0/gems/rake-13.3.1/lib/rake/rake_test_loader.rb:6:in '<main>'
rake aborted!
```
This PR will migrate to 2.x to resolve the above error.
Fix clear-code#6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We can't use Faraday v2 if we use the adapter in Typhoeus.
typhoeus/typhoeus#582
It causes the following error: