Untitled design (24)

How to use Active Admin gem in rails?


Active Admin is a framework for creating administration style interfaces. In this blog, I have shared how can you use active admin gem in rails easily.

First and foremost, active admin is released as a Ruby Gem. This gem needs to be installed within a Ruby on Rails 3 application.


image source :activeadmin.info

Steps to install and use active admin gem in your ruby on rails application

Step -1

To install, simply add the following to your gemfile:

# Gemfile

  gem ‘activeadmin’

Step -2

If you are using Rails 3.1, you must also include a beta version of MetaSearch and sass-rails:

# Gemfile in Rails >= 3.1

  gem ‘activeadmin’

  gem ‘sass-rails’

  gem “meta_search”, ‘>= 1.1.0.pre’

Step -3

After updating your bundle, run the installer

$> rails generate active_admin:install

This installer creates an initializer used for configuring defaults used by Active Admin as well as a new folder at app/admin to put all your admin configurations.

Step -4

Migrate your database and start the server using these commands:

$> rake db:migrate

$> rails server

Step -5

Visit http://localhost:3000/admin  and log in using:

User: admin@example.com

Password: password

If you have any further doubts, drop us an email at info@infigic.com and we’ll get back to you with the best possible solution. Infigic is a Ruby on Rails Development Company and we are always there to solve your queries.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *