0

我正在使用 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

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

谢谢,

4

1 回答 1

1

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

于 2010-03-13T21:13:54.560 回答