简体   繁体   中英

rails g active_admin:install ERROR

I have problem with ActiveAdmin. I've added the gem 'activeadmin' to my Gemfile and ran

$ bundle install

which worked. But when I try to:

$ rails g active_admin:install

I get:

/home/dominika/active_admin/config/application.rb:10:in `<module:ActiveAdmin>': superclass mismatch for class Application (TypeError)
from /home/dominika/active_admin/config/application.rb:9:in `<top (required)>'
from /home/dominika/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/application.rb:82:in `require'
from /home/dominika/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/application.rb:82:in `preload'
from /home/dominika/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/application.rb:143:in `serve'
from /home/dominika/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/application.rb:131:in `block in run'
from /home/dominika/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/application.rb:125:in `loop'
from /home/dominika/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/application.rb:125:in `run'
from /home/dominika/.rvm/gems/ruby-2.2.0/gems/spring-1.2.0/lib/spring/application/boot.rb:18:in `<top (required)>'
from /home/dominika/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/dominika/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'

Maybe it's really stupid, but I really don't know how to fix it. Please, help...

This happens because your application is called active_admin . Rename it, and everything will work.

To rename the app view this thread to get the instructions.

Overall it sounds like you are pretty much doing things correctly.

I've added the gem 'active_admin'

From the documentation it's:

# Gemfile

gem 'activeadmin' 

Does that help?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM