Ruby/Rails - Remove ActiveAdmin from my application

16,454

Solution 1

If you run the following code it should destroy active admin:

rails destroy active_admin:install
rails destroy active_admin:resource product

Solution 2

Run this in terminal

rails destroy active_admin:install

Remove gem 'activeadmin' from your gemfile.

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

Solution 3

You also need to delete all the active admin related js and css files in your assets folder after running rails destroy active_admin:install

Share:
16,454
ChrisWesAllen
Author by

ChrisWesAllen

Developer Trying to learn how to develop

Updated on June 04, 2022

Comments

  • ChrisWesAllen
    ChrisWesAllen almost 2 years

    I had a good time playing with Active Admin the administrative framework within my application. http://activeadmin.info/

    When I installed it I ran

    rails g active_admin:install
    rake db:migrate
    rails g active_admin:resource product
    

    and it generated alot of migrations and code within my application.

    My question if I would like to go back and have everything that active_admin put into my application taken out, how would i do so?

    Is there one 'rails active_admin:uninstall' command to get rid of everything or do I have to manually create migrations to delete all the tables and search through my code to see what it added?