Closed jhroy closed 9 years ago
Okay, it seems ScraperWiki is using an older version of the 'twitter' gem. The syntax is client = Twitter::Client.new do |config| instead of (in the case of the current version [5.x]) client = Twitter::REST::Client.new do |config|
Self-resolved, but I nevertheless leave this issue on the forum in case other users stumble upon it.
Hi!
I'd wrote a Ruby twitter bot and would like to use it in ScraperWiki. I'm using the 'twitter' gem written by @sferik. I require it at the start of my script.
But it returns this error: "uninitialized constant Twitter::REST (NameError)"
The script works fine when I run it locally on my Terminal. What should I do to make it work in SW?
Thanks!
PS: Here is the relevant portion of code:
require "twitter" [...] client = Twitter::REST::Client.new do |config| config.consumer_key = "MYKEY" config.consumer_secret = "MYKEY" config.access_token = "MYKEY" config.access_token_secret = "MYKEY" end