El Capitan upgrade: Library not loaded: /usr/local/lib/libmysqlclient.18.dylib El Capitan upgrade: Library not loaded: /usr/local/lib/libmysqlclient.18.dylib ruby ruby

El Capitan upgrade: Library not loaded: /usr/local/lib/libmysqlclient.18.dylib


I was getting the same issue earlier on, I fixed it by reinstalling the gem mysql2.


this will solve your problem:

gem pristine mysql2

solution by Cesar Sulbarán


For those on OS X El Capitain or more, this fix my problem:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib

For more info https://stackoverflow.com/a/32875545/1066915