【问题标题】:I get an Exception when trying to implement reset password with Authlogic尝试使用 Authlogic 实现重置密码时出现异常
【发布时间】:2010-03-13 18:43:49
【问题描述】:

我使用 Ruby on Rails 2.3.5 和 Ruby 1.9 并实现了 Authlogic 作为我的身份验证引擎。 Authlogic 工作正常。但现在我一直在尝试使用以下教程实现密码重置:
http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/

但是当我输入 mysite.com/password_resets/new 时出现以下异常

Processing PasswordResetsController#new (for 127.0.0.1 at 2010-03-13 01:09:45) [GET]
Completed in 9ms (DB: 0) | 200 [http://localhost/password_resets/new]
[2010-03-13 01:09:45] ERROR TypeError: can't convert Array into String
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/string/output_safety.rb:34:in `concat'
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/activesupport-2.3.5/lib/active_support/core_ext/string/output_safety.rb:34:in `concat_with_safety'
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/handler/webrick.rb:63:in `block in service'
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/response.rb:158:in `each'
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/response.rb:158:in `each'
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:16:in `send'
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:16:in `method_missing'
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:22:in `method_missing'
    /Users/tammam56/.rvm/gems/ruby-1.9.1-p378/gems/rack-1.0.1/lib/rack/handler/webrick.rb:62:in `service'
    /Users/tammam56/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
    /Users/tammam56/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
    /Users/tammam56/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

老实说,我不确定从哪里开始调试。是因为我使用的是 Ruby 1.9 吗?有些人似乎在使用 Authlogic 和 Ruby 1.9 时遇到问题:
http://isitruby19.com/authlogic

请告诉我如何解决/调试这个问题?

谢谢,

【问题讨论】:

    标签: ruby-on-rails authlogic ruby-1.9


    【解决方案1】:

    您可以先对 PasswordResetsController#new 操作进行测试,然后在此处发布输出。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-10
      • 2017-08-13
      • 1970-01-01
      • 2021-03-24
      • 2022-01-25
      • 1970-01-01
      相关资源
      最近更新 更多