active_campaign
active_campaign copied to clipboard
"Undefined method `dependency`" when requiring the gem
After installing the gem locally from the master branch, when I try to require 'active_campaign'
in an irb session I get the following error:
.../gems/active_campaign-3.0.0/lib/active_campaign/faraday/middleware/request.rb:12:in `<class:Request>':
undefined method `dependency' for ActiveCampaign::Faraday::Middleware::Request:Class (NoMethodError)
This is because I have a version of Faraday greater than 2.0 installed and the dependency
method has been deprecated. (source).
To fix this I changed the gemspec to use Faraday 1 instead, which fixed the problem:
- spec.add_dependency 'faraday', '>= 1.0', '< 3.0'
+ spec.add_dependency 'faraday', '>= 1.0', '< 2.0'
Could we upgrade the master branch to Faraday 2? I'm willing to submit a PR.