ArgumentError in ActiveAdmin::Devise::SessionsController#create

Asked by on 2012-03-08T00:54:27-05:00
I installed ActiveAdmin and log in with default admin name and password, while there is an error and hope somebody can help me with it. Thanks !

Here is the error:

ArgumentError in ActiveAdmin::Devise::SessionsController#create 
wrong number of arguments (2 for 1)
Rails.root: E:/Ruby/challenger2 - Copy

Application Trace | Framework Trace | Full Trace
app/helpers/sessions_helper.rb:2:in `sign_in'
Part of the sessions_helper.rb file:

module SessionsHelper
 def sign_in(user)

 self.current_user = user 

 def current_user=(user)
 @current_user = user

 def current_user
 @current_user ||= user_from_remember_token

 def signed_in?


Best Answer

Answered by on 2012-04-16T13:09:48-04:00
gem Devise, which Active Admin depends on, probably use "sign_in" function - this name has one of members function of your SessionsHelper module. this cause invoke of wrong function. one solution is not to use activeadmin as an admin tool ))) and the other one is to rename "sign_in" function globally to "sign_in_" for example

and don't forget to restart server: it helps from time to time )

Your Answer
No advertising and No spamming please.