Ruby Development

MySQL bindings with Ruby 1.9

I’ve started messing around with Rails 2.3.1 (aka RC2) and seeing how it works with Ruby 1.9. Aside from having to install all my gems for the new version of Ruby, the mysql bindings needed to be installed too. Here’s how I got it working:

Note: I’m using macports installations of ruby 1.9 and mysql

# Grab mysql-ruby


# Setup to use your mysql configuration files

ruby1.9 extconf.rb \
  --with-mysql-include=/opt/local/include/mysql5/mysql/ \
  --with-mysql-lib=/opt/local/lib/mysql5/mysql/ \

sudo make

# Run tests to make sure everything passes
ruby1.9 ./test.rb -- localhost

# And to finish it out
sudo make install