RailsAdmin Is Best Admin Framework Gem Which Fully Supports Rails 4

First thing First, If you guys looking any Gem which will manage your data through Admin Panel, then I'll suggest you guys Rails_Admin Gem, RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.



There is another admin framework Gem which we called 'ActiveAdmin', but sadly this gem not work on Rails 4, but if you are using Rails 3 or below, then you guys should go with Active Admin, because Activeadmin is an Advanced Admin Framework. But yaa, if you are using Rails 4 and want a admin framework for rubyonrails application, then you guys don't have option and will use RailsAdmin

SO GETTING STARTED WITH RAILS_ADMIN AND SETTING YOUR ADMINS

gem 'rails_admin'
Then Run:
bundle install
Now:
rails g rails_admin:install
run this command in your terminal, during this process, Rails will ask you some questions like according to this gem requirement so just follow those steps.
t will modify your config/routes.rb, adding:
mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
ote: The devise_for route must be placed before the mounted engine. The following will generate infinite redirects.
mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
devise_for :admins
This will resolve the infinite redirect error:
devise_for :admins
mount RailsAdmin::Engine => '/rails_admin', :as => 'rails_admin'
Finally run:
rake db:migrate
That's it. Now
Start the server:
rails server
or what ever server you are using like Puma or thin

You should now be able to administer your site at http://localhost:3000/admin.

Tags: Ruby on Rails Tutorials, Ruby on Rails Videos, Ruby Gems, Gems Use trick, Ruby code Rails servers

Comments