Skip to content

Instantly share code, notes, and snippets.

@rizalp
Last active August 10, 2023 02:58
Show Gist options
  • Save rizalp/d776a08a538c5738e821265816ecbccd to your computer and use it in GitHub Desktop.
Save rizalp/d776a08a538c5738e821265816ecbccd to your computer and use it in GitHub Desktop.
install mysql2 gem by linking it with mysql 5.7 homebrew
brew install [email protected]
gem install mysql2 -v '0.4.8' -- --with-ldflags=-L/usr/local/opt/[email protected]/lib --with-cppflags=-I/usr/local/opt/[email protected]/include
@rizalp
Copy link
Author

rizalp commented May 28, 2019

@rizalp
Copy link
Author

rizalp commented Nov 25, 2019

alternative, without installing mysql server:

brew install mysql-client
bundle config build.mysql2 --with-ldflags=-L/usr/local/opt/mysql-client/lib --with-cppflags=-I/usr/local/opt/mysql-client/include/mysql

@KhanhVanCong
Copy link

Thanks a lot. That helps my day :)

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