← Home
devise

Rails Generate devise:install

Reference & Command Builder

Published: 2023-12-11
Author: Harrison Broadbent
Type: Reference & Command Builder

Rails Generate devise:install

Rails Generate Devise:Install (rails g devise:install) is the generator for installing the Devise Authentication Libary into a Ruby on Rails app.

To setup Devise in a new Ruby on Rails app, you run the following commands —

# add Devise gem
 bundle add devise
 
# install Devise
 rails g devise:install

From here, you'll probably want to run the Devise Model Generator, which configures Devise for new or existing models.

Command Builder for rails g devise:install

rails g devise:install 

Generator Options

Runtime Options

# Command Options
❯ rails g devise:install

Usage:
  rails generate devise:install [options]

Options:
      [--skip-namespace], [--no-skip-namespace]              # Skip namespace (affects only isolated engines)
      [--skip-collision-check], [--no-skip-collision-check]  # Skip collision check
  -o, --orm=ORM                                              # Indicates when to generate orm
                                                            # Default: active_record

Runtime options:
  -f, [--force]                    # Overwrite files that already exist
  -p, [--pretend], [--no-pretend]  # Run but do not make any changes
  -q, [--quiet], [--no-quiet]      # Suppress status output
  -s, [--skip], [--no-skip]        # Skip files that already exist

# Command Description
Description:
  Creates a Devise initializer and copy locale files to your application.