Active Admin Routing错误未初始化的常量Admin :: DashboardController

时间:2014-10-08 14:06:17

标签: ruby-on-rails ruby activeadmin

我在更新ActiveAdmin后收到以下错误:

on http://0.0.0.0:3000/admin

Routing Error

uninitialized constant Admin::DashboardController

我尝试移动自定义根并在ActiveActive路由之前设计路由。

我的路线:

MyApp::Application.routes.draw do

  root :to => "download#index"

  devise_for :users, ActiveAdmin::Devise.config

  ActiveAdmin.routes(self)

我的佣金路线:

                   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

我已经完成了关于堆栈的几乎所有问题,对此问题的任何帮助将不胜感激!

SOLUTION:

通过以下方式解决:

触摸app / admin / dashboard.rb

并添加了以下代码:

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

1 个答案:

答案 0 :(得分:2)

通过以下方式解决:

touch app/admin/dashboard.rb

和代码来自:

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