Setting Up Devise With Rails 7

In this blog we’re going to look at how to setup devise gem with rails 7 using importmaps. If you want to just setup devise without knowing the nitty gritty follow tldr; otherwise scroll past it for the full blog. tldr; Follow thsese steps to setup devise with rails. You must have rails 7.x installed on your system. Set up new app rails new devise-tutorial Inside the devise-tutorial folder create a new controller rails g controller Home index Add devise gem to your Gemfile bundle add devise Install devise configuration into your Rails app bundle exec rails g devise:install Generate devise views rails g devise:views Generate a user model for devise bundle exec rails g devise user Apply rails migration bundle exec rails db:migrate Restart the rails server if already running or start the rails app using rail s Go to http://localhost:3000/users/sign_in THE END What is devise ?...

June 6, 2024 · 7 min · Ashish Gaur