I'd like to replace the default dashboard page in ActiveAdmin with a custom page.

This is mainly because I want a page based on a resource, i.e. a page generated with ActiveAdmin.register and not with ActiveAdmin.register_page.

I just deleted the dashboard.rb file, hoping that MyCustomAdmin that is a regular (and working) ActiveAdmin resource, would simply take the place of dashboard.

But it didn't, instead I'm getting this error:

uninitialized constant Admin::DashboardController

So I changed the ActiveAdmin initializer and set:

# config/initializers/active_admin.rb

config.root_to = 'my_custom_admin#index'

I also have MyCustomAdmin like this:

# app/admin/my_custom_admin.rb

ActiveAdmin.register MyCustomAdmin do
  menu :priority => 1, :label => 'Report'

  index do
    column "column 1 title", :column1
  end

end

Among my models I also have:

# app/models/my_custom_admin.rb

class MyCustomAdmin < ActiveRecord::Base
end

So the problem is when I try to access on localhost:3000/admin I get the error:

uninitialized constant Admin::MyCustomAdminController

But if I go to localhost:3000/admin/my_custom_admin it works just fine.

Why is localhost:3000/admin not working?

Edit
Report