Last active
April 12, 2018 00:32
-
-
Save yuhonas/bff797bac44b8908f61ce24e6f48adee to your computer and use it in GitHub Desktop.
Failed to build gem native extension error when installing the mysql2 ruby gem on mac with brew installed mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ensure we have xcode commandline tools installed as we'll be compiling | |
xcode-select --install | |
# we can either install the gem manually eg. | |
# where '0.3.21' is the version of the gem you wish to install | |
# | |
# gem install mysql2 -v '0.3.21' -- \ | |
# --with-mysql-config=$(brew --prefix mysql)/bin/mysql_config | |
# or configure bundler then all future mysql2 gem installation's will use the additional args | |
bundle config build.mysql2 --with-mysql-config=$(brew --prefix mysql)/bin/mysql_config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment