Like Meltemi posted on this post: Passenger error "library not loaded" i get the same error. but the answer posted does not help!
dlopen(/Users/andi/.rvm/gems/ruby-1.9.2-p136/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle, 9):
Library not loaded: libmysqlclient.16.dylib
Referenced from: /Users/andi/.rvm/gems/ruby-1.9.2-p136/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/andi/.rvm/gems/ruby-1.9.2-p136/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle
Im operating with RVM 1.2.6, Rails 3.0.3, Ruby 1.9.2. The server worked fine, till i switched my repository from svn to git. It seems very strange to me that this change effected my installation.
$bundle list
Gems included by the bundle:
...
* mysql2 (0.2.7)
...
$ /usr/local/mysql-5.5.8-osx10.6-x86_64/bin/mysql --version
/usr/local/mysql-5.5.8-osx10.6-x86_64/bin/mysql Ver 14.14 Distrib 5.5.8, for osx10.6 (i386) using readline 5.1
thx for response!
EDIT: solution:
according to rails server fails to start with mysql2 using rvm & ruby 1.9.2-p0 on OSX 10.6.5 and http://freddyandersen.wordpress.com/2010/10/03/mysql-5-5-snow-leopard-and-rails/
this command solves my problem: sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql/lib/libmysqlclient.16.dylib ~/.rvm/gems/ruby-1.9.2-p136/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle