Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Active Admin Routing error uninitialized constant Admin::DashboardController

I'm getting the following error after updating ActiveAdmin:

on http://0.0.0.0:3000/admin

Routing Error

uninitialized constant Admin::DashboardController

I tried moving my custom root and devise routes before ActiveActive routes.

My routes:

MyApp::Application.routes.draw do

  root :to => "download#index"

  devise_for :users, ActiveAdmin::Devise.config

  ActiveAdmin.routes(self)

My rake routes:

                   root            /                                              download#index
       new_user_session GET        /admin/login(.:format)                         active_admin/devise/sessions#new
           user_session POST       /admin/login(.:format)                         active_admin/devise/sessions#create
   destroy_user_session DELETE|GET /admin/logout(.:format)                        active_admin/devise/sessions#destroy
          user_password POST       /admin/password(.:format)                      active_admin/devise/passwords#create
      new_user_password GET        /admin/password/new(.:format)                  active_admin/devise/passwords#new
     edit_user_password GET        /admin/password/edit(.:format)                 active_admin/devise/passwords#edit
                        PUT        /admin/password(.:format)                      active_admin/devise/passwords#update
                   root            /                                              dashboard#index
             admin_root            /admin(.:format)                               admin/dashboard#index

I've went through almost all the questions on stack, any help regarding this issue would be greatly appreciated!

SOLUTION:

Solved it by:

touch app/admin/dashboard.rb

and added code from:

https://github.com/activeadmin/activeadmin/blob/master/lib/generators/active_admin/install/templates/dashboard.rb

like image 293
neo Avatar asked Oct 08 '14 14:10

neo


1 Answers

Solved it by:

touch app/admin/dashboard.rb

and code from:

https://github.com/activeadmin/activeadmin/blob/master/lib/generators/active_admin/install/templates/dashboard.rb

like image 151
neo Avatar answered Nov 15 '22 06:11

neo