如何修复或重新安装restful身份验证插件?

时间:2009-12-09 14:59:06

标签: ruby-on-rails restful-authentication

我最近将我的rails从2.0.1升级到2.3.3,从那时起,restful_authentication插件就出现了不稳定的行为。下面是我在某些时候获得的3个错误和堆栈跟踪,但不是所有时间。我在不同的请求中得到了这些,但是这里的代码编辑将它们放在一起。

我使用git获取了restful-authentication插件的最新版本,然后删除了我的rails应用程序中的vender / plugins下的旧restful-authentication文件夹,并从git的最新克隆复制到该目录。这是我第一次使用git,除了手动复制目录外,我不知道将restful-auth插件安装到我的应用程序中的正确方法。

从rails 2.0.1升级到2.3.3后,我从'已删除了'AuthenticatedSystem的副本...'错误,但在从git获取最新版本之前。自从git获取最新的restful_authentication以来,其他2个错误都是新的。

ArgumentError (A copy of AuthenticatedSystem has been removed from the module tree but is still active!):
  lib/authenticated_system.rb:97:in `login_from_session'
  lib/authenticated_system.rb:12:in `current_user'
  lib/authenticated_system.rb:6:in `logged_in?'
  lib/authenticated_system.rb:34:in `authorized?'
  lib/authenticated_system.rb:52:in `login_required'
  C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'


TypeError (can't dup NilClass):
  lib/authenticated_system.rb:97:in `login_from_session'
  lib/authenticated_system.rb:12:in `current_user'
  lib/authenticated_system.rb:6:in `logged_in?'
  lib/authenticated_system.rb:34:in `authorized?'
  lib/authenticated_system.rb:52:in `login_required'
  C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'


SystemStackError (stack level too deep):
  lib/authenticated_system.rb:17:in `current_user='
  lib/authenticated_system.rb:97:in `login_from_session'
  lib/authenticated_system.rb:12:in `current_user'
  lib/authenticated_system.rb:6:in `logged_in?'
  lib/authenticated_system.rb:34:in `authorized?'
  lib/authenticated_system.rb:52:in `login_required'
  C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'

1 个答案:

答案 0 :(得分:0)

绝对看起来无法找到执行这些方法所需的库。你可以运行./script/plugin install -f强制重新安装吗?