devise Add and install the Devise gem


Example

Modify your Gemfile to include the Devise gem:

gem 'devise'

Then update your gems with:

$ bundle install

Run the installers in your project:

$ rails generate devise:install

Then create your Devise model (e.g. User) with:

$ rails generate devise User

you'll need to set up the default URL options for the Devise mailer in environment.rb file config/environments/development.rb:

config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

Devise makes some changes to your database, so you'll need to run the created migrations:

$ rake db:migrate