[RUBY] When I changed to M1 mac, bundle install became impossible

The other day, when the M1 macbook pro arrived and I was building an environment with excitement saying "Now, this is a goodbye to the frustrating life of air!", A mysterious error appeared at the bundle install stage and it became more frustrating. It was.

As a result of various investigations while thinking "early new year ...", I was able to solve it, so I will share it as a memo.

About the error

I followed the steps below until I got stuck with an error. -Clone rails project locally from github ・ Bundle install And the gem that caused the error was as far as I could see:

- ffi
- sassc

Solutions

In my environment, I solved it by the following procedure.

Finder> Applications> Terminal (right-click)> Get Info> Check "Open with Rosetta"

Summary

This was a solution I happened to find while doing other research. For the time being, I will post the support page of apple that seems to be related to this case below. If you need to install Rosetta on your Mac (https://support.apple.com/ja-jp/HT211861)

Recommended Posts

When I changed to M1 mac, bundle install became impossible
Error when bundle install
I struggled with pip install on an M1 Mac
I changed the Ruby version and now I can't bundle install
How to install JDK8-10 (Mac)
I want to add devise in Rails, but I can't bundle install
When I try to install gempg it says I don't have libpq-fe.h
How to install JMeter for Mac
mysql2 fails to install with bundle install
What to do if an error occurs when nokogiri enters when bundle install
How to install Play Framework 2.6 for Mac
How to install Eclipse (Photon) on Mac
I want to install PHP 7.2 on Ubuntu 20.04.
I can't install rails on my mac