lostisland / faraday_middleware

Various Faraday middlewares for Faraday-based API wrappers
MIT License
556 stars 205 forks source link

undefined method `dependency' for ActiveCampaign::Faraday::Middleware::Request:Class (NoMethodError) #280

Closed IvanMuts closed 2 years ago

IvanMuts commented 2 years ago

when i tried to update my rails to rails 7 and ruby 2.7.2, thats the error is was getting. please help.

olleolleolle commented 2 years ago

Hi! The API for Faraday 2 has changed slightly, so that the "optional late-loaded dependency method called dependency" is removed.

You can ask for a lower-than-2 version of Faraday in your Gemfile, to avoid using the new API for your app.

The middleware used has not been updated to support the new API.

iMacTia commented 2 years ago

Hi @IvanMuts, this is an issue with the active_campaign gem from what I can see. The reason is because they use the dependency method (see https://github.com/mhenrixon/active_campaign/blob/f2298d4da458259e96134fcb0cc25846802a8b91/active_campaign.gemspec#L33), which has been removed in Faraday v2.

However, they declare they're compatible with Faraday v2 in their gemspec (see https://github.com/mhenrixon/active_campaign/blob/master/active_campaign.gemspec#L33).

You should open an issue on their repository and point them to our UPGRADING.md guide so they can correctly support Faraday v2

IvanMuts commented 2 years ago

thanks guys