简体   繁体   English

如何修复或重新安装restful_authentication插件?

[英]how to repair or reinstall restful_authentication plugin?

I recently upgraded my rails from 2.0.1 to 2.3.3 and since then have been seeing erratic behavior with the restful_authentication plugin. 我最近将Rails从2.0.1升级到了2.3.3,从那时起,我发现restful_authentication插件的行为不稳定。 Below are 3 of the errors and stack traces that I got some of the time, but not all the time. 以下是我有时遇到的错误和堆栈跟踪的3条信息,但并非总是如此。 I get these on separate requests, but the code-editing here put them all together. 我在单独的请求中得到了这些,但是这里的代码编辑将它们全部组合在一起。

I got the latest version of the restful-authentication plugin with git, and then deleted the old restful-authentication folder under vender/plugins in my rails app, and copied over that directory from the latest clone from git. 我使用git获取了最新版本的restful-authentication插件,然后删除了我的rails应用程序中vender / plugins下的旧的restful-authentication文件夹,并从git的最新克隆中复制了该目录。 This was my first time using git, I didn't know the proper way to install the restful-auth plugin into my app, besides manually copying the directories. 这是我第一次使用git,除了手动复制目录之外,我不知道将restful-auth插件安装到我的应用程序中的正确方法。

I was getting the 'copy of AuthenticatedSystem has been removed...' error after the upgrade from rails 2.0.1 to 2.3.3, but before getting the latest from git. 从rails 2.0.1升级到2.3.3之后,但在从git获取最新版本之前,我得到了“ AuthenticatedSystem的副本已被删除...”错误。 The other 2 errors are new since getting the latest restful_authentication from git. 自从git获取最新的restful_authentication以来,其他两个错误是新的。

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'

Definitely looks like it can't find the libraries it needs to execute those methods. 显然,它找不到执行这些方法所需的库。 Can you just run ./script/plugin install -f to force a reinstall? 您可以只运行./script/plugin install -f强制重新安装吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM