Skip to content

Instantly share code, notes, and snippets.

@StanBoyet
Created November 25, 2015 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StanBoyet/6a67099d9c5cb31b6974 to your computer and use it in GitHub Desktop.
Save StanBoyet/6a67099d9c5cb31b6974 to your computer and use it in GitHub Desktop.
ERROR: Error installing mysql: ERROR: Failed to build gem native extension

Another way for MacOS users

If you used "brew" to install mysql:

gem install mysql2 -v 'x.x.x' -- --with-mysql-config=/usr/local/Cellar/mysql/y.y.y/bin/mysql_config

x.x.x = version of the mysql2 gem you want to install

y.y.y = the version of mysql you have installed ls /usr/local/Cellar/mysql to find it.

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