2012-11-21 43 views
3

我只是想ActiveAdmin。我已經得到了儀表盤和一些資源的工作,但現在當我運行例如軌道發生器我:ActiveAdmin和「未初始化的不斷InheritedResources ::基地」

% rails generate scaffold Post name:string 
.../.rvm/gems/[email protected]/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing': uninitialized constant InheritedResources::Base (NameError) 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/base_controller/menu.rb:2:in `<module:ActiveAdmin>' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/base_controller/menu.rb:1:in `<top (required)>' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/base_controller.rb:2:in `<top (required)>' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/resource_controller/actions.rb:2:in `<module:ActiveAdmin>' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/resource_controller/actions.rb:1:in `<top (required)>' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/resource_controller.rb:2:in `<top (required)>' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/batch_actions.rb:7:in `block in <top (required)>' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/event.rb:25:in `call' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/event.rb:25:in `block in dispatch' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/event.rb:24:in `each' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/event.rb:24:in `dispatch' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/application.rb:179:in `load!' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin/application.rb:205:in `routes' 
    from .../.rvm/gems/[email protected]/gems/activeadmin-0.5.0/lib/active_admin.rb:79:in `routes' 
    from .../lap-app/config/routes/routes.rb:27:in `block in <top (required)>' 
    from .../.rvm/gems/[email protected]/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec' 
    ... 

而且routes.rb:27是:

ActiveAdmin.routes(self) 

我沒有發現任何的工作對我來說: ((

感謝

+0

有同樣的問題.... – mArtinko5MB

回答

0

你有沒有無意中註冊未嘗不是一種模式(使用Rails摹active_admin:資源名稱)ActiveAdmin.routes(個體經營)自動根erates CRUD路線您註冊的資源,以便有一個機會,這些登記的資源之一,實際上是一個也沒有。

如果你想註冊的東西一個網頁,是不是一個模式,你已經在.RB註冊它ActiveAdmin.register_page「NAME」代替ActiveAdmin.register NAME

+0

感謝,但沒有 – ddidier

0

嘗試移動ActiveAdmin.routes(self)頂端,而不是在中間或在routes.rb文件的末尾。

+0

感謝我沒有,但沒有奏效 – ddidier

相關問題