Skip to content

Instantly share code, notes, and snippets.

@stephanschubert
Last active May 25, 2017 08:09
Show Gist options
  • Save stephanschubert/6547993 to your computer and use it in GitHub Desktop.
Save stephanschubert/6547993 to your computer and use it in GitHub Desktop.
How to install mysql2 gem on OSX
# Assumes you're using homebrew.
# Adjust the version to your convenience.
env ARCHFLAGS="-Os -g -fno-strict-aliasing -arch x86_64" gem install mysql2 -v '0.3.19' -- \
--with-mysql-include=`brew --prefix mysql`/include \
--with-mysql-config=`brew --prefix mysql`/bin/mysql_config
@stephanschubert
Copy link
Author

Maybe you have to adjust the CFLAGS in mysql_config too - remove:

-Wno-null-conversion -Wno-unused-private-field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment