Closed Hamdan85 closed 9 years ago
Your code won't work first of all because you can't authorize_from_access on an array.
Second of all I tested it using a fresh download of the linkedin gem and it works fine.
Are you sure your bundle on heroku isn't being locked at a specific version?
Matt,
I was using this array because, for some reason that I do not understand, sometimes it gave me an error like 'Wrong number of arguments (2 of 1)' so I use this method. But this situation occurrs with or without the array.
I'm not sure about the heroku lock, but the problem is that it was working before and I'm not specifying any version. I just declared it on my gemfile like gem 'linkedin'.
It stopped to work from nowhere, and I even tried a HUGE rollback on my repository and it is still not working. Can't understand.
Please, help lolololol
Closure:
Developer helped me to figure out that for some reason, even not specifying the version, heroku wasn't getting the latest version of the gem and this is why it was giving the error.
We managed to specify the version and solved a consequent dependency issue (ominiauth) by declaring gem 'hash', '2.0' on my gemfile.
It was working until yesterday.
Now, it works offline (development enviroment) but on production, after:
client = LinkedIn::Client.new(ENV["LINKEDIN_KEY"], ENV["LINKEDIN_SECRET"]) authkeys = [self.token, self.secret] client.authorize_from_access(authkeys)
when I try to access user data, for example with: @linkedin.avatar_url = client.picture_urls.all.first
it gives me an 500 error:
NoMethodError: undefined method `picture_urls' for #LinkedIn::Client:0x007f3e13c50e60
Anything has changed? Thanks in advance,