我的配置文件包含以下代码:
production:
email_delivery:
delivery_method: :sendmail
development:
email_delivery:
delivery_method: :sendmail
但是在生产模式下运行Redmine应用程序时,我仍然遇到以下错误。
NoMethodError (undefined method `error' for 0:Fixnum):
app/models/mailer.rb:431:in `deliver_mail'
app/models/mailer.rb:86:in `block (2 levels) in deliver_issue_edit'
app/models/issue.rb:826:in `each_notification'
app/models/mailer.rb:85:in `block in deliver_issue_edit'
app/models/journal.rb:77:in `block in each_notification'
app/models/journal.rb:75:in `each'
app/models/journal.rb:75:in `each_notification'
app/models/mailer.rb:84:in `deliver_issue_edit'
app/models/journal.rb:190:in `send_notification'
app/models/journal.rb:54:in `save'
app/models/issue.rb:1515:in `create_journal'
app/models/issue.rb:165:in `create_or_update'
app/controllers/issues_controller.rb:478:in `block in save_issue_with_child_records'
app/controllers/issues_controller.rb:466:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:188:in `update'
我不清楚为什么我收到此错误,并且我还检查了Redmine文档和动作邮件程序配置的配置。我仍然无法弄清楚原因。 有没有人遇到类似的问题?
答案 0 :(得分:1)
您刚刚在配置文件中发布了电子邮件配置部分的标题,还是这些是您唯一的设置?电子邮件配置部分应如下所示:
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: smtp.example.net
port: 25
domain: example.net
authentication: :login
user_name: redmine@example.net
password: redmine
请参阅Redmine documentation。