O'Reilly logo

Learning Devise for Rails by Nia Mutiara, Hafiz, Giovanni Sakti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installation

We are going to learn how to install this interesting authorization plugin to your Rails application. For your information, this is the specification of application sample that I used:

  • Rails 4 (4.0.0)
  • Devise 3 (3.0.3)
  • SQLite 3 (1.3.8)

Let's create our Rails application by executing this command:

$ rails new learning-devise

The first thing that should be done is you need to add the Devise gem to your Gemfile.

gem 'devise'

To make sure that everything is installed properly, you can execute the following command inside your Rails application folder:

$ bundle install

The command will install the Devise gem, and now you have to install the configuration files for Devise. You can install it all at once by executing the following command:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required