Giter Site home page Giter Site logo

Comments (8)

dianpan avatar dianpan commented on March 29, 2024 4

Seeing similar errors when I upgraded to v0.3.1.2

SyntaxError: /gems/facebookbusiness-0.3.1.2/lib/facebook_ads/ad_objects/user.rb:189: syntax error, unexpected ':', expecting keyword_end
        api.has_param :fb:channel, 'string'
                         ^
/gems/facebookbusiness-0.3.1.2/lib/facebook_ads/ad_objects/user.rb:189: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
...has_param :fb:channel, 'string'
...                               ^
/gems/facebookbusiness-0.3.1.2/lib/facebook_ads/ad_objects/user.rb:193: syntax error, unexpected ':', expecting keyword_end
        api.has_param :fb:explicitly_shared, 'bool'
                         ^
/gems/facebookbusiness-0.3.1.2/lib/facebook_ads/ad_objects/user.rb:193: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
...m :fb:explicitly_shared, 'bool'
...                               ^
/gems/facebookbusiness-0.3.1.2/lib/facebook_ads/ad_objects/user.rb:194: syntax error, unexpected ':', expecting keyword_end
        api.has_param :image:height, 'int'

from facebook-ruby-business-sdk.

codytwinton avatar codytwinton commented on March 29, 2024 2

Thanks for alerting us. We’re a small team working on the available business SDKs, but we’ll do our best to address this soon.

from facebook-ruby-business-sdk.

kerwin-personalyze avatar kerwin-personalyze commented on March 29, 2024

same here. getting the same error.

 /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:189: syntax error, unexpected ':', expecting keyword_end
               api.has_param :fb:channel, 'string'
                                 ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:189: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:193: syntax error, unexpected ':', expecting keyword_end
               api.has_param :fb:explicitly_shared, 'bool'
                                 ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:193: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:194: syntax error, unexpected ':', expecting keyword_end
               api.has_param :image:height, 'int'
                                    ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:194: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:195: syntax error, unexpected ':', expecting keyword_end
               api.has_param :image:secure_url, 'string'
                                    ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:195: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:196: syntax error, unexpected ':', expecting keyword_end
               api.has_param :image:type, 'string'
                                    ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:196: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:197: syntax error, unexpected ':', expecting keyword_end
               api.has_param :image:url, 'string'
                                    ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:197: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:198: syntax error, unexpected ':', expecting keyword_end
               api.has_param :image:user_generated, 'bool'
                                    ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:198: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:199: syntax error, unexpected ':', expecting keyword_end
               api.has_param :image:width, 'int'
                                    ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:199: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:649: syntax error, unexpected ':', expecting keyword_end
               api.has_param :fb:channel, 'string'
                                 ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:649: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:653: syntax error, unexpected ':', expecting keyword_end
               api.has_param :fb:explicitly_shared, 'bool'
                                 ^
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:653: syntax error, unexpected '\n', expecting &. or :: or '[' or '.'
       /Users/*****/.rvm/rubies/ruby-2.4.4/lib/ruby/gems/2.4.0/gems/facebookbusiness-0.3.1.4/lib/facebook_ads/ad_objects/user.rb:654: syntax error, unexpected ':', expecting end-of-input
               api.has_param :image:height, 'int'

from facebook-ruby-business-sdk.

csroberson avatar csroberson commented on March 29, 2024

Yep, same here:

2.2.3 :010 > user = FacebookAds::User.get(id)
SyntaxError: /Users/.../gems/facebookbusiness-0.3.1.5/lib/facebook_ads/ad_objects/user.rb:239: syntax error, unexpected ':', expecting keyword_end
api.has_param :fb:channel, 'string'
^

Any idea what is causing this? Seems rather fundamental.

from facebook-ruby-business-sdk.

csroberson avatar csroberson commented on March 29, 2024

Please fix that error
ALL
api.has_param :fb:channel, 'string'
api.has_param :image:height, 'int' ....

@Flexoman, I was looking at the code and the form :fb:... is used in several places as is :image:.... I see the # FB:AUTOGEN comment in most, if not all, of the files I've examined so far; so it looks like something went wrong in generation of this version. Do you have any idea what it may be? I can see that the previous version from July 27 does not have this syntax:

19e232f

You reported this 21 days ago and I'm surprised it has not been addressed as it seems like this release is quite questionable.

in files
/lib/facebook_ads/ad_objects/user.rb
/lib/facebook_ads/ad_objects/group.rb

than
uninitialized constant FAMEAdCampaign
must be a FameAdCampaign
in /lib/facebook_ads/ad_objects/campaign.rb

FWIW, I don't see that constant, FAMEAdCampaign, in the campaign.rb file. Maybe I'm missing something.

thanks

I'm going to try reverting back a version or two.

from facebook-ruby-business-sdk.

csroberson avatar csroberson commented on March 29, 2024

@jingping2015, @codytwinton, @vicdus, and/or @facebook-github-bot are you folks aware of this issue? All you need to do to recreate is run the example: https://github.com/facebook/facebook-ruby-business-sdk/blob/master/examples/UserAccountsEdge.rb

require 'facebook_ads'

access_token = '<ACCESS_TOKEN>'
app_secret = '<APP_SECRET>'
app_id = '<APP_ID>'
id = '<ID>'

FacebookAds.configure do |config|
  config.access_token = access_token
  config.app_secret = app_secret
end

user = FacebookAds::User.get(id)

I can reproduce this problem in 0.3.1.0 and 0.3.1.5 on a system running Ruby 2.2.3. I have to go all the way back to 0.3.0.6 for the error not to happen.

from facebook-ruby-business-sdk.

jingping2015 avatar jingping2015 commented on March 29, 2024

Hi everyone, thanks for reporting this bug. I think we already fix this issue in our recent release, for example :

api.has_param :fb_channel, 'string'

Let me know if we miss any cases. (Please add the permalink, appreciate it!)

from facebook-ruby-business-sdk.

joaquindiaz01 avatar joaquindiaz01 commented on March 29, 2024

anyone still getting same error?

An Array ({"GEM_PATH"=>["/home/joaquin/.rvm/gems/ruby-2.2.4", "/home/joaquin/.rvm/gems/ruby-2.2.4@global"]}) was passed in from bin/rails:3:in 'load' /home/joaquin/.rvm/gems/ruby-2.2.4/gems/polyglot-0.3.5/lib/polyglot.rb:65:in 'require': /home/joaquin/.rvm/gems/ruby-2.2.4/gems/facebook_ads-0.6.6/lib/facebook_ads/ad_set.rb:104: syntax error, unexpected '.' (SyntaxError) breakdowns: breakdowns&.join(','), ^ /home/joaquin/.rvm/gems/ruby-2.2.4/gems/facebook_ads-0.6.6/lib/facebook_ads/ad_set.rb:104: syntax error, unexpected ',', expecting keyword_end /home/joaquin/.rvm/gems/ruby-2.2.4/gems/facebook_ads-0.6.6/lib/facebook_ads/ad_set.rb:105: syntax error, unexpected ',', expecting keyword_end from /home/joaquin/.rvm/gems/ruby-2.2.4/gems/polyglot-0.3.5/lib/polyglot.rb:65:in 'require' from /home/joaquin/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in 'block in require' from /home/joaquin/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in 'load_dependency' from /home/joaquin/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in 'require' from /home/joaquin/.rvm/gems/ruby-2.2.4/gems/facebook_ads-0.6.6/lib/facebook_ads.rb:12:in 'block in <top (required)>' from /home/joaquin/.rvm/gems/ruby-2.2.4/gems/facebook_ads-0.6.6/lib/facebook_ads.rb:12:in 'each' from /home/joaquin/.rvm/gems/ruby-2.2.4/gems/facebook_ads-0.6.6/lib/facebook_ads.rb:12:in '<top (required)>'

I only installed the gem successfully but i can't serve my application

from facebook-ruby-business-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.