I’m using active admin in my rails 3.0.9 app with the default setup.i.e I have User model with devise authentication for customer login and Active Admin is running on AdminUser model. All Ok apart from the active admin login page. When I try to access http://localhost:3000/admin I get the active admin login page very quickly. But after I enter the username/password correctly/incorrectly the authentication process takes nearly 3-5 minutes. Because of this reason I can’t even deploy the app on heroku, and I get timeout errors on heroku logs.
But how ever in development mode after I logged in to active admin, everything works perfectly. I’m assuming this is happening due an issue with routing. So I’m pasting my routes file here with fully.
Can some one help me on this please? Thanks
UPDATE 09-Jan: Its seems like the issue is not related to the routes I think. I removed all the other models/controllers/views/routes leaving only User and AdminUser stuffs. But I still experiencing the slowness.
Never mind I’ve found the issue and the probably the solution as well. I’m posting it here so it will help someone else with a similar issue.
In my application I was originally using
authlogicgem for authentication but recently I’ve switched over this todevisefor better support. But I still wanted to allow old users to login to the app with same passwords. So I’ve overridden the devise encryption from Bcrypt to Authlogic’s sha512 as below.config/initializers/devise.rb
But I never change the
AdminUsermodel to fit with the above change.So the fix should be in my model I should use the
:encryptableand:encryptor => :authlogic_sha512And in AdminUser migration file encryptable columns should be enabled