facebook / facebook-ruby-business-sdk

Ruby SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
209 stars 160 forks source link

SDK faraday dependency #102

Closed al13bash closed 4 years ago

al13bash commented 4 years ago

Which SDK version are you using?

0.3.3.3

What's the issue?

SDK is not working properly and I cannot update SDK to the latest version, because on the project we are using faraday v1.0.1 and as I can see you restrict faraday to s.add_dependency 'faraday', '~> 0.15' starting from SDK version 0.3.3.4

Steps/Sample code to reproduce the issue

My Gemfile contains the following

gem 'facebookbusiness'
gem 'faraday', '~> 1.0.1'

Gemfile.lock

facebookbusiness (0.3.3.3)
    faraday
    json

Observed Results:

That's what I see in the console when try to use User

Loading development environment (Rails 6.0.2.2)
2.7.0 :001 > FacebookAds::User.deserializer
Traceback (most recent call last):
        1: from (irb):1
NoMethodError (undefined method `achieves' for :games:Symbol)

That's why I started trying different gem versions and workarounds. I can confirm that everything works fine with downgraded faraday or updated gemspec (with updated faraday dependency). I would prefer to not downgrade faraday, so it would be nice if you can update gemspec so that we don't need to fork, but can use your up-to-date gem.

Expected Results:

Thanks!

jairobluecaribu commented 4 years ago

Hello, I have the same problem with version facebookBusiness 0.7.0.1. So, I had to uninstall faraday v 1.0.1 and replace it for v 0.17.3 instead. that's worked for me.

nitsujri commented 4 years ago

We forked and bumped the Faraday version w/o touching anything else. It works for us and our use case, so YMMV.

al13bash commented 4 years ago

Hello @nitsujri, Thanks for your comment! That's exactly what I've done for now. The main goal of this issue is to bring it up to the devs. 😄

stale[bot] commented 4 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.