How to set up a Rails 7 app with Devise gem for user authentication

Updated: 

Learn how to integrate Devise gem for user authentication in a Rails 7 app, step-by-step. Part of the Full Stack Rails Mastery course.

This lesson is from Full Stack Rails Mastery.

On submitting the sign up form, you may run into this error:
NoMethodError in Devise::RegistrationsController#create

undefined method `user_url' for #<Devise::RegistrationsController:0x0000000000da98>

-----------------------------------------------
Please answer a few questions to help us make even better lessons for you.