DEV Community

Maya Sheriff
Maya Sheriff

Posted on

How to Install Devise

Use Devise for Users

Install

rails generate devise:install
Enter fullscreen mode Exit fullscreen mode

Change :delete to :getin devise file

# config/initializers/devise.rb, Line 269

config.sign_out_via = :get
Enter fullscreen mode Exit fullscreen mode

Set a root route in routes

# config/routes.rb

root "boards#index"
Enter fullscreen mode Exit fullscreen mode

Use our new generator supplied by the gem to create the User model and routes

rails generate devise user
Enter fullscreen mode Exit fullscreen mode

Then Migrate

rake  db:migrate
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay