We all are very excited when building new software on new hardware. But, what if your hardware is too advanced to run your server well by following the documentation?
I was in trouble for a week trying to get things right! If you’re having trouble getting your Rails app to work with the Mac M1 Chip, then hopefully I can save you from a huge headache.
You can get started with creating your first project on Rails here.
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 in the right place. Let's get to the point!
Follow the following steps: (I hope they will resolve your issue!)
bundle install
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 of the above steps:
bundle install - path vendor/cache
The above steps have helped me to keep going with rails and I hope they will help you too! If not, let's discuss here, or you can DM me here.
Keep Googling, Keep Coding!