On OSX, I’ve installed  RVM, ruby 1.9.2, mysql2 gem, Rails 3.1.0. When starting rails server, I’m getting the following errors:

`require’: dlopen(/Users/mike/myapp/ruby/1.9.2/gems/mysql2-0.3.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)
This simply solved my problem:

$ export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH

Source: http://rorguide.blogspot.com/2011/07/getting-error-library-not-loaded.html

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>