异常通知程序在升级rails 2.3.4后停止工作

时间:2009-09-11 07:08:56

标签: ruby-on-rails

异常通知器工作正常,直到昨天我的生产服务器升级到rails 2.3.4。请帮忙。

错误

wrong number of arguments (3 for 2)
[RAILS_ROOT]/lib/smtp_tls.rb:8:in `check_auth_args'

回溯:

[RAILS_ROOT]/lib/smtp_tls.rb:8:in `check_auth_args'
[RAILS_ROOT]/lib/smtp_tls.rb:8:in `do_start'
  /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/smtp.rb:525:in `start'
  /Library/Ruby/Gems/1.8/gems/actionmailer-2.3.4/lib/action_mailer/base.rb:682:in `perform_delivery_smtp'
  /Library/Ruby/Gems/1.8/gems/actionmailer-2.3.4/lib/action_mailer/base.rb:523:in `__send__'
  /Library/Ruby/Gems/1.8/gems/actionmailer-2.3.4/lib/action_mailer/base.rb:523:in `deliver!'
  /Library/Ruby/Gems/1.8/gems/actionmailer-2.3.4/lib/action_mailer/base.rb:395:in `method_missing'

1 个答案:

答案 0 :(得分:2)

我自己管理了这个,但仍想分享 问题是因为ruby 1.8.7中的smtp库已经改变了。我找到了来自here

的解决方案

所以,你

  1. rm /lib/smtp_tls.rb
  2. ruby​​ script / plugin install http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls
  3. 从vendor / plugin / action_mailer_optional_tls / lib / smtp_tls.rb中删除authtype参数并更改第33行

    check_auth_args user,secret if secret or secret