AR_mailer 抛出异常。 邮件仍已发送
我正在设置 AR_mailer 来发送邮件。 从发送的角度来看,所有工作都有效,但是当实际创建邮件时,我收到此错误:
A LoadError occurred in users#create:
Expected /usr/lib/ruby/gems/1.8/gems/adzap-ar_mailer-2.1.5/lib/action_mailer/ar_mailer.rb to define ActionMailer::ARMailer
[RAILS_ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:261:in `load_missing_constant'
邮件仍然添加到队列中。
我正在使用 ad_zap 的 AR_mailer 分支 (http://github.com/adzap/ar_mailer/tree/ master) 版本 2.1.5,带有 Rails 2.1.0
谢谢 缺口。
I'm setting up AR_mailer to send mail. All works from a sending point of view, but when the mail is actually created I receive this error:
A LoadError occurred in users#create:
Expected /usr/lib/ruby/gems/1.8/gems/adzap-ar_mailer-2.1.5/lib/action_mailer/ar_mailer.rb to define ActionMailer::ARMailer
[RAILS_ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:261:in `load_missing_constant'
The mail is still added to the queue though.
I'm using ad_zap's AR_mailer fork (http://github.com/adzap/ar_mailer/tree/master) version 2.1.5, with Rails 2.1.0
Thanks
Nick.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,这个问题是由于我从旧版本的 ARMailer 升级造成的。
我需要将我的邮件程序更改为从 ActionMailer::Base 继承,而不是像以前的版本那样从 ActionMailer::ARMailer 继承。
Ok, the problem was caused by my upgrading from an older version of ARMailer.
I needed to change my mailers to inherit from ActionMailer::Base, and not ActionMailer::ARMailer as with the previous version.