Install mysql2 gem on Apple Silicon M1

Braga J
Francium Tech
Published in
Oct 18, 2021

--

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!

--

--