Installing mysql2 is not straightforward in M1. After installing the Rosetta version of mysql using brew, you need to follow up with the following command to install he mysql2 gem

arch -x86_64 gem install mysql2 -v 0.5.3 -- --srcdir=/usr/local/mysql/include

Replace it with the version from the your Gemfile.lock

Francium Tech is a technology company laser-focused on delivering top-quality software of scale at extreme speeds. The numbers and Size of the data excite us. If you have any requirements in building a large-scale application or want a free health check of your systems or architecture, feel free to shoot an email to contact@francium.tech, we will get in touch with you!

--

--

Photo by benjamin lehman on Unsplash

Installing the pg gem on Apple M1 silicon is not straightforward. As with many other development setup, it is recommended as of today to run all these software using Rosetta.

First download the Postgress app. Once done, ensure that you have the x86 Ruby installed (either through RVM or Rbenv)

Once done, you can run the below command to install the PG Gem.

arch -x86_64 gem install pg -v '1.1.4' -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config

Francium Tech is a technology company laser-focused on delivering top-quality software of scale at extreme speeds. The numbers and Size of the data excite us. If you have any requirements in building a large-scale application or want a free health check of your systems or architecture, feel free to shoot an email to contact@francium.tech, we will get in touch with you!

--

--

To install Nokogiri on Apple M1, assuming you are using x86 Ruby this command would do the trick (no need to open the terminal in Rosetta mode)

arch -x86_64 gem install nokogiri -v '1.10.10' --platform=ruby -- --use-system-libraries

Francium Tech is a technology company laser-focused on delivering top-quality software of scale at extreme speeds. The numbers and Size of the data excite us. If you have any requirements in building a large-scale application or want a free health check of your systems or architecture, feel free to shoot an email to contact@francium.tech, we will get in touch with you!

--

--