Steps to get MySQL2 up and running on Mountain Lion:
- Install Homebrew
- Install rbenv + ruby-build
- Install
1.9.3-p286
usingrbenv install 1.9.3-p286
- Install mysql from here.
Running gem install mysql2
results in the following error:
Library not loaded: libmysqlclient.18.dylib
Edit your ~/.bash_profile
so that it looks like:
export PATH="$HOME/.rbenv/bin:$PATH:/usr/local/mysql/bin"
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib
eval "$(rbenv init -)"
The following links helped me figure this out: