Install Native MySQL Gem - Edge Rails Stopped Including It

July 28th, 2008 by Justin Ball

I decided to try out the latest edge Rails and I started getting this error:

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
/!\ FAILSAFE /!\ Mon Jul 28 22:58:38 -0600 2008
Status: 500 Internal Server Error
dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle

At first I tried:

sudo gem install mysql

which of course didn't work because it never works. You have to tell the complier where to find stuff. Do this:


sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Tags:   · · 1 Comment

Leave A Comment

1 response so far ↓

  • 1 Arun Gupta Oct 31, 2008 at 6:23 pm

    Do you know of a pure Ruby MySQL driver ?