Install MySQL Ruby C bindings on Debian and Mac OS X

Debian with mysql 4

sudo apt-get install libmysqlclient14-dev
sudo gem install mysql -- --with-mysql-config=/usr/bin/mysql_config

Choose the newest ruby version when prompted.

You can check that it was installed by running require 'mysql.so' within irb.

Mac OS X with MySQL 5 (from MacPorts)

sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5

Choose the newest ruby version when prompted.


About this entry