新手问题 devise_async 发送邮件出错

bajiudongfeng · 发布于 2017年03月25日 · 最后由 bajiudongfeng 回复于 2017年03月26日 · 323 次阅读
14935
  • 使用devise_async 发送邮件,按照这个教程做的.
  • 可是却报如下错误,求解:
ArgumentError (wrong number of arguments (given 3, expected 1..2)):

app/controllers/users/registrations_controller.rb:13:in `create'
  Rendering /home/zhang/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout
  Rendering /home/zhang/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb
  Rendered /home/zhang/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (4.9ms)
  Rendering /home/zhang/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
  Rendered /home/zhang/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.2ms)
  Rendering /home/zhang/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
  Rendered /home/zhang/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.6ms)
  Rendered /home/zhang/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (27.7ms)

谢谢!

共收到 6 条回复
3

没有仔细看教程,但是报错信息很明确 wrong number of arguments 检查一下被调用的方法的参数,是不是接口变了?

9442

maybe help

google key word: devise_async ArgumentError (wrong number of arguments (given 3, expected 1..2))

14935

@flowerwrong 这个之前找到了,没有解决问题.

14935

@lgn21st 这个插件貌似还不支持rails 5.目前还是个open issue

3
14935bajiudongfeng 回复

fork 一份源码,然后把这个问题 fix 掉,或者换其他方案。

14935

@lgn21st 暂时是先自己实现了,稍后看看源码去谢谢!

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册