Wednesday, 11 January 2017

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.

H2 - 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.

4 comments:

  1. Nice blog its very informative thanks for sharing. We provide mobile application development company India contact us for more info.

    ReplyDelete
  2. This blog is really valuable and informative. Thanks for sharing it. Really enjoyed reading this article and learn some new things like
    ecommerce app source code.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Great blog its very informative thanks for sharing. We Gofers Clone Script company India contact us for more info.

    ReplyDelete