Skip to content

Instantly share code, notes, and snippets.

@zavan
Forked from fernandoaleman/mysql2-mojave.md
Last active May 5, 2022 10:18
Show Gist options
  • Save zavan/8328ac58e54ce82c873f003ea78f5bd5 to your computer and use it in GitHub Desktop.
Save zavan/8328ac58e54ce82c873f003ea78f5bd5 to your computer and use it in GitHub Desktop.
Install mysql2 gem on MacOS Monterey

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Monterey.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl

Install mysql2 gem.

gem install mysql2 -v '0.5.4' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment