Possible problems with rails + mysql on OS X Lion

Standard

If you are trying to run your app with Rails and you got some errors when execute the rake db:migrate It is possible that you must to install the GCC. In Lion installation there is no gcc default. You can check GCC here: https://github.com/kennethreitz/osx-gcc-installer

Other possible error is the lack of a  symbolic link:

( Library not loaded: libmysqlclient.18.dylib )

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

With these changes you may run successful the mysql + rails in your app.

Remembering that is a good practice to reinstall your gem after these changes:

gem uninstall mysql2

bundle install

Advertisements