Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Micah Wedemeyer
RE: Trouble with acts_as_authenticated [ reply ]  
2007-09-04 10:28
Yes, Richard's fix worked for me (with a little extra). Just to be totally explicit:

Using 0.8.1 of Comatose w/ Rails 1.2.3, adding unloadable to comatose/lib/comatose/admin_controller.rb fixed one part

To fix the other part:
A copy of AuthenticatedSystem has been removed from the module tree but is still active!

I had to move the session key setting from application.rb to environment.rb like so:
ActionController::Base.session_options[:session_key] = '_my_session_id'

This ensures that it gets picked up by the Comatose plugin.

By: Richard Lennox
RE: Trouble with acts_as_authenticated [ reply ]  
2007-01-22 00:34
See http://dev.rubyonrails.org/ticket/6001 for a solution to this problem. Add unloadable to the Comatose::AdminController plugin.

By: Isaac Kearse
RE: Trouble with acts_as_authenticated [ reply ]  
2006-10-31 02:37
This didn't totally fix the problem, it just changed it a
little.


This fix only worked because I was using a before filter
that was doing a query on the User model. If I take that
before_filter away I'm still getting an error, but this one
is a little different:

A copy of AuthenticatedSystem has been removed from the
module tree but is still active!

This is using acts_as_authenticated which is included in the
application controller - but doesn't seem to be reloading
properly. Not sure if this is problem with comatose or aaa.

This whole issue is a bit confusing.

By: Isaac Kearse
RE: Trouble with acts_as_authenticated [ reply ]  
2006-10-27 01:26
In the main comatose controller: (http://mattmccray.com/svn/rails/plugins/comatose/lib/comatose/controller.rb)

On the second line try changing:

require_dependency 'application'
to
require 'application'

This seems to fix the error for me on rails edge.



By: Isaac Kearse
RE: Trouble with acts_as_authenticated [ reply ]  
2006-10-14 22:07
I think I've figured out why this is happening...

In the Comatose controllers Matt has included this code:

# Just mark it as unreloadable by default to prevent
# the development
# mode hassles people have been having...
def reloadable?
false
end

(see http://mattmccray.com/svn/rails/plugins/comatose/lib/comatose/admin_controller.rb )

unfortunately reloadable? seems to have been deprecated on edge, and now has no effect.

I've got no idea how to deal with this so for now I'm developing in production mode :)
(this problem only manifests in development mode)

I'm reluctant to play with any core rails code, so I'll just live with this for now, hopefully It will be sorted out once rails 1.2 arrives.

Regards,
Isaac


By: Kenny Rueter
RE: Trouble with acts_as_authenticated [ reply ]  
2006-09-29 11:16
Yes, I am using Edge Rails.

I've also got the authorization plugin installed as well as flash_helper.

I know it is a total hack and might cause some other problems I am not aware of, but if I comment out the following three lines in /vendor/rails/activesupport/lib/active_support/dependencies.rb Comatose and acts_as_authenticated work fine:

#unless qualified_const_defined?(from_mod.name) && from_mod.name.constantize.object_id == from_mod.object_id
# raise ArgumentError, "A copy of #{from_mod} has been removed from the module tree but is still active!"
#end

-Kenny

By: Isaac Kearse
RE: Trouble with acts_as_authenticated [ reply ]  
2006-09-28 23:35
OK I switched my project from using the restful_authentication plugin to using acts_as_authenticated but I still got this error.

Then I switched from running on rails edge to running on rails 1.1.6, after which this error disappeared.

The rest of my app seems to function ok with acts_as_authenticated but comatose_admin doesn't like it for some reason.

The other weird thing is when I user the current_user method (from aaa) in ComatoseAdmin#authorize the first time it is called it works fine. but after that it fails giving the error that Kenny got in the first post.

By: Isaac Kearse
RE: Trouble with acts_as_authenticated [ reply ]  
2006-09-28 22:52
I am getting this same error, except with the restful_authentication plugin. (which is just acts_as_authenticated converted to the restful style). I am running on edge rails also with this project.

Another project that is running with acts_as_authenicated (not restful) and rails 1.1.6 doesn't seem to be having this problem.

Are you running on rails edge ?

are you using any other plugins ?

I also tried the defer load, and also putting an empty comatose_admin_controller.rb into my app/controllers folder - both to no avail.


By: Kenny Rueter
Trouble with acts_as_authenticated [ reply ]  
2006-09-27 12:22
I am having trouble getting the acts_as_authenticated plugin to work properly, and I suspect it has to do with Comatose. On my homepage, I am able to login, but then any other page request I make returns this error:
"A copy of AuthenticatedSystem has been removed from the module tree but is still active!"

I followed the instructions in the Comatose Getting Started guide and set ENV['DEFER_COMATOSE_LOAD'] to true and add Comotose.load at the bottom of my environment.rb file, but if I do that Webrick won't even load. It gives me this error:

"=> Booting WEBrick...
./script/../config/../vendor/plugins/comatose/lib/comatose/admin_controller.rb:5
: superclass mismatch for class AdminController (TypeError)"

Any ideas what I am doing wrong?

Thanks.