我使用delayed_job的宝石在这里:https://github.com/collectiveidea/delayed_job的Rails 3 - 的delayed_job(collectiveidea),设法拖延邮寄包装 - 错误:NoMethodError(未定义的方法'延迟”的UserMailer:类)
在我有以下观察员:
UserMailer.delay.msg_notification(record)
在user_mailer.rb
class UserMailer < ActionMailer::Base
...
def msg_notification(record)
mail(
:to => "#{record.user.email}",
:subject => "Notification"
)
end
..
end
但这个错误有:
NoMethodError (undefined method `delay' for UserMailer:Class):
任何想法?谢谢
您是否仔细检查过以确保gem位于您的gem文件中,并且您已经运行了bundle安装。您是否已经创建了文档中概述的gem所需的后端表? – 2010-12-11 22:47:02