collectiveidea/delayed_job — Issue #323: NoMethodError with delayed_job
Author: tshr
Created: 2011-12-22 11:14:11+00:00
State: open

I am trying to implement delayed_job for a mailer on a rails 3.1.0 app locally with ruby 1.8.7 .

Following the documentation I am making the delay call from my controller as follows:

EventMailer.delay.event_message_email(current_user, @event_message)

This causes the task to be added to the job table but when I run rake jobs:work it logs the following error:

Class#event_message_email failed with NoMethodError: undefined method `event_message_email' for Class:Class - 6 failed attempts

Calling the mailer method without delay works fine, and I am running it on the default rails server so its not the issue with Thin mentioned in the FAQ. Any idea whats wrong? Thanks.