我正在尝试将 Active Admin 添加到 Rails 应用程序中,该应用程序已经有一个定制的 CMS 和 Admin 模型/admin
,并且已经使用了设计 gem,但是当我尝试运行时rails g active_admin:install
,rake db:migrate
我收到了这个错误:
/usr/local/rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activeadmin-0.6.0/lib/active_admin/namespace.rb:227:in `eval': Admin is not a module (TypeError)
from /usr/local/rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activeadmin-0.6.0/lib/active_admin/namespace.rb:227:in `eval'
from /usr/local/rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activeadmin-0.6.0/lib/active_admin/namespace.rb:227:in `register_module'
from /usr/local/rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activeadmin-0.6.0/lib/active_admin/namespace.rb:41:in `initialize'
from /usr/local/rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activeadmin-0.6.0/lib/active_admin/application.rb:142:in `new'
from /usr/local/rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activeadmin-0.6.0/lib/active_admin/application.rb:142:in `namespace'
from /usr/local/rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activeadmin-0.6.0/lib/active_admin/application.rb:128:in `register'
from /usr/local/rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activeadmin-0.6.0/lib/active_admin.rb:79:in `register'
我知道可以在安装创建的初始化程序中设置默认命名空间,但我想知道是否有办法将我选择的默认命名空间作为安装命令的选项传递?
提前致谢!