How to install and uninstall ActiveAdmin in rails

  1. Install Active Adminn
    1.  When you install cmd it
 
rails g active_admin:install
                 Delete the asset files from js and css folders if any remain
               
                 Delete any of these lines in Routes.rb
             devise_for :admin_users, ActiveAdmin::Devise.config
             ActiveAdmin.routes(self)
             ActiveAdmin.routes(self)
Then create a new migration with:
  drop_table :active_admin_comments
You may also need:
  drop_table :admin_notes
Or rollback the migrations by finding the relevant files MoveAdminNotesToComments and CreateAdminNotes in your db/migrate folder
rake db:migrate:down VERSION=the_version_number
rake db:migrate:down VERSION=the_version_number

rake db:migrate
rails g active_admin:resource product

  1. Uninstall Active Admin
    1. If you run the following code it should destroy active admin:

rails destroy active_admin:install
rails destroy active_admin:resource product

Comments