Skip to content

Instantly share code, notes, and snippets.

@Bivek
Last active January 31, 2024 05:09
Show Gist options
  • Save Bivek/3114a4886677fcb293b4afae60c3720e to your computer and use it in GitHub Desktop.
Save Bivek/3114a4886677fcb293b4afae60c3720e to your computer and use it in GitHub Desktop.
Install Mysql2 gem on M1 chip
Working solution
-----------------
gem install mysql2 -v '0.5.5' -- --with-mysql-config=$(brew --prefix mysql)/bin/mysql_config --with-ldflags="-L$(brew --prefix zstd)/lib -L$(brew --prefix openssl)/lib" --with-cppflags=-I$(brew --prefix openssl)/include
Better to use ```trilogy``` gem instead of ```mysql2``` for smooth setup process.
In your database.yml file update adapter to trilogy if you are using trilogy instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment