Setup Devise:

gem 'devise'
bundle install
rails g devise:install

In routes.rb, put this line above ‘mount RailsAdmin …. ‘:

devise_for :admin, path_names: { sign_in: 'login', sign_out: 'logout', sign_up: 'signup' }


rails g devise admin

We used ‘admin’ because we are integrating with the back-end.

In config/initializers/devise.rb:

config.secret_key = 'YOUR SECRET KEY'
config.mailer_sender = 'YOUREMAIL'


rails g devise:views

In config/initializers/rails_admin.rb

RailsAdmin.config do |config|
  config.authenticate_with do
     warden.authenticate! scope: :admin

That’s it. Open RailsAdmin again and it should ask you to login.

Note: If you don’t have a user yet, create it in the console:

rails c{:email => "", :password => "123456", :password_confirmation => "123456" }).save(:validate => false)