Installing Devise Gem on Mac M1

I am trying to learn Ruby on Rails on my new M1 Macbook Air Big Sur. I did not realize when I purchased this Mac that everything is different and more complicated with the M1 processor. I’ve managed to get to a certain point where I have installed Rails, connected to GitHub and Heroku finally after several hours of work. I now want to install the devise gem so I can create accounts for my app, but I cannot run the rails g devise:install command. Does anyone know how to install devise on an M1 machine?

You’ll need to add devise to your Gemfile and run bundle install.

Then, to be safe, you should prefix all of your rails commands. with bundle exec, so bundle exec rails g devise:install. Let me know if this works? – H