We all are very excited while building a new software on new hardware. But, what if your hardware is too advance to run your server well by following the documentation! I was in trouble for a week to get things right!
You can get started with creating your first project on rails from https://guides.rubyonrails.org/getting_started.html
Every time I was trying to use rails console using "rails c", I used to get some huge error related to mimemagic and many others. If you get the same, you are at the right place. Let's get to the point!
Follow the following steps: (I hope it will resolve your issue!)
brew install shared-mime-info
bundle update nokogiri marcel mimemagic
Add gem 'sassc' to Gemfile
bundle update ffi sassc
bundle update sass-rails
This should make your rails app work on Mac M1 Chip. But, if it's still not working then try this out after all the above steps:
bundle install --path vendor/cache
All the above steps have helped to keep going with rails and I hope it will help you too! If not, let's get on discussion here or DM me https://twitter.com/AmishaShukla5.
Keep Googling, Keep Coding!