Let's create a devise configuration file using commands To use devise, create a configuration file using devise-specific commands in addition to installing Gem.
Rails g devise: install in terminal
config/initializers/devise.rb config / locales / devise.en.yml is created.
Rails g devise user in the terminal
app/models/user.rb db/migrate/20XXXXXXXXXXXX_devise_create_users.rb test/fixtures/users.yml test / models / user_test.rb is created devise_for: users is automatically added to routes.rb
Execute the migration file created by the rails g devise user command earlier Rails db: migrate in terminal This will create the users table The routing has changed, so restart the server rails s