GitHub User: morrissinger
Can someone fill in the gap that occurs around 8:40? I'm using the latest version of the Twitter gem, and when I set up a twitter.rb initializer as specified, and configure environment variables to match up with the lines in the twitter.rb, go into the rails console, and run Twitter.favorites(count: 1) to test things, I get:
Twitter::Error::Unauthorized: This method required authentication...
Did something change in the Gem? Or, are there steps missing from the railscast?
I've basically followed the directions exactly, with the exception that the Gem I use is the latest Twitter Gem, located at github.com/sferik/twitter.
This is really useful and went 99% of the way to getting me going with CollectiveIdea's Delayed::Job plugin with Rails3. However, one absolutely crucial but missing piece from this Railscast, at least with respect to Rails3 is that without adding a line to your config/application.rb file to load your lib/mailing_job.rb file when your application is initialize!d means that your class definition will not be available to the jobs:work rake task when it tries to dequeue a job from the database and run it. As such, you will see jobs queuing and dequeuing, but nothing will happen; your perform method will not be called because your class will not be available to Delayed::Job when it YAML::load()s your delayed job.