Rails 3 MySQL 5.5 Mac OSX 10.6

Posted by Tobias Mueller

Install git, then install rvm, switch to the latest ruby with rvm, because Apples ruby is outdated and broken.
Install MySQL 5.5, install Rails 3, if Rails is complaining about

dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.4/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.4/lib/mysql2/mysql2.bundle
Reason: image not found – /Library/Ruby/Gems/1.8/gems/mysql2-0.2.4/lib/mysql2/mysql2.bundle


Change the bundle via

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.6/lib/mysql2/mysql2.bundle

TrackBack

TrackBack URL for this entry:
http://www.infobean.de/cgi-bin/mt/mt-tb.cgi/146

Post a comment