Reputation: 255
I'm getting an error message when I try to go inside the admin dashboard by the rails_admin gem.
Error
undefined method `new' for nil:NilClass
This is the whole code
klass.setup if klass.respond_to? :setup
@authorize = proc do
@authorization_adapter = klass.new(*([self] + args).compact)
end
elsif block
@authorize = block
It is pointing to this spot
@authorization_adapter = klass.new(*([self] + args).compact)
I don't know why this happening because I did not touch anything from the rails admin
Upvotes: 2
Views: 813
Reputation: 1129
To anyone who is scratching their head over this issue and stumbled upon this thread, on /config/initializers/rails_admin.rb
try replacing
config.authorize_with :cancan
with
config.authorize_with :cancancan
Upvotes: 3