Mysql driver for rails

When installing the mysql gem you might get this:
Building native extensions.  This could take a while… ERROR:  Error installing mysql: ERROR: Failed to build gem native extension.
the fix is easy but you are going to need the mysql-devel package if you are on redhat then do this:
yum install mysql-devel
Now you can install the mysql driver like this:
gem install mysql — –with-mysql-config=`which mysql_config`
To test the driver us the rails console:
# ruby script/console
>> require ‘mysql’
>> puts Mysql::VERSION
This should give you the 20700 version. (As of Jan 2007 thats the latest version.)Now enjoy the speed.
Advertisements

One response to this post.

  1. Hi,

    Excellent.Nice article thanks for sharing.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: