Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails - uninitialised constant AdminUser with ActiveAdmin gem

I'm new in Rails and I'll try to install ActiveAdmin to my existing project (Rails 3.2.1).

i've had activeadmin, meta_search, devise and sass-rails in my gemfile. Require devise in the configuration/application.rb.

When I try to run "rails generate active_admin:install" or "rails server", i have an error :

C:/RailsInstaller/Ruby1.9.3/l ive_support/inflector/methods connstant AdminUser (NameError)

I dont know how to fix.

Thanks :)


2 Answers

Just delete the following line on routes.rb

devise_for :admin_users, ActiveAdmin::Devise.config

Then rerun

rails g active_admin:install

like image 179
Mutuma Avatar answered Apr 15 '26 16:04

Mutuma


I got this same error after uninstalling and resintalling activeadmin (as I wanted to remove it from admin_user to install it in my own user).

Solution was to search through my project for "admin", and comment all the code that activeadmin had left after uninstall.

The files where I found activeadmin code were:

routes.rb
schema.rb
like image 40
chech Avatar answered Apr 15 '26 17:04

chech