How to Make your Rails App Work with the Mac M1 Chip [SOLVED]

Written by coderamisha | Published 2021/10/07
Tech Story Tags: ruby-on-rails | macos | terminal | rails-tutorial | ruby-on-rails-tutorial | rails-and-mac-m1-chip | programming | tutorial

TLDR You can get started with creating your first project on rails [here](https://://guides.org/getting_started.html). If you get the same, you are in the right place. If it's still not working then try it out after all of the above steps: bundle install. This should make your rails app work on Mac M1 Chip. If not, let's discuss here, or you can DM me [here] or you. can Twitter.com/AmishaShukla5.via the TL;DR App


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.

Starting a Project on Rails


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!)

Step 1:

bundle install

Step 2:

brew install shared-mime-info

Step 3:

bundle update nokogiri marcel mimemagic

Step 4:

Add gem 'sassc' to Gemfile

Step 5:

bundle update ffi sassc

Step 6:

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!


Written by coderamisha | Know about the problem solving and join in the technology revolution. #TechSetGo
Published by HackerNoon on 2021/10/07