views:

272

answers:

1

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. Below are 3 of the errors and stack traces that I got some of the time, but not all the time. 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. 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.

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. The other 2 errors are new since getting the latest restful_authentication from git.

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'
A: 

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?

Lukas
I did that. Still getting at least the 'TypeError (can't dup NilClass)' error. Although there wasn't any output from the script/plugin install -f command, so I don't know if it re-installed correctly or not.