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

Countries and Money gems should either be a runtime dependency or not required #101

Closed Borzik closed 4 years ago

Borzik commented 4 years ago

Which SDK version are you using?

0.7.0.0

What's the issue?

countries and money gems are required in file but not added as runtime dependencies, so LoadError is raised on FacebookAds::ServerSide::UserData.new calls.

Steps/Sample code to reproduce the issue

Put this into a file and execute:

require 'bundler/inline'
gemfile do
  source 'https://rubygems.org'
  gem 'facebookbusiness'
  # uncomment both lines to fix the code
  # gem 'countries'
  # gem 'money'
end
FacebookAds::ServerSide::UserData.new
puts 'success!'

Observed Results:

LoadError raised

Expected Results:

success! printed

PlugIN73 commented 4 years ago

I have this problem too.

jiehanzheng commented 4 years ago

Yea I can confirm this too. I will find someone to fix

GarrettJMU commented 4 years ago

Confirmed issue as well. Install gems and all is well. I'm on 0.7.0.2

roots-ai commented 4 years ago

getting NameError: uninitialized constant FacebookAds::ServerSide

gaga5lala commented 4 years ago

I've tested the sample code with ruby 2.6.6p146 and both 0.7.0.0, 0.7.0.2. success! printed without error.

Borzik commented 4 years ago

Was fixed by https://github.com/facebook/facebook-ruby-business-sdk/commit/c20dfd7a6ebbe2dd3d195bc22e8e36941f826071