I am having a problem installing the mysql2 gem.
This comes up when I do gem install mysql2
:
Marks-MacBook-Pro:~ Mark$ gem install mysql
If you used homebrew to install mysql, brew install mysql
,this worked for me:
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.
to get the version of mysql
brew info mysql
mysql: stable 5.7.19 (bottled)
...
/usr/local/Cellar/mysql/5.7.19 (322 files, 233MB) *
...
then if you want to install with bundle:
bundle config build.mysql --with-mysql-config=/usr/local/Cellar/mysql/y.y.y/bin/mysql_config