更新ActiveAdmin后出现以下错误:

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)

我的 rake 路:
                   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

我已经解决了几乎所有的堆叠问题,对于此问题的任何帮助将不胜感激!

解决方案:

解决方法:

触摸app/admin/dashboard.rb

并从以下代码中添加了代码:

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

最佳答案

解决方法:

touch app/admin/dashboard.rb

和来自以下代码:

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

关于ruby-on-rails - Active Admin路由错误未初始化常量Admin::DashboardController,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26258966/

10-12 23:04