Skip to content

Instantly share code, notes, and snippets.

@alispat
Forked from fernandoaleman/mysql2-catalina.md
Created February 24, 2021 15:20
Show Gist options
  • Save alispat/d2e4019fbb033d4412461c28f6e127c2 to your computer and use it in GitHub Desktop.
Save alispat/d2e4019fbb033d4412461c28f6e127c2 to your computer and use it in GitHub Desktop.
Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Catalina with MySQL 5.7.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl

Install mysql2 gem.

gem install mysql2 -v '0.5.3' -- --with-mysql-config=/usr/local/Cellar/mysql@5.7/5.7.29/bin/mysql_config --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