Making the move to the latest and greatest isn’t always smooth. Case in point, I’ve been working with SQLite3 on my macbook for the development of DanceSignUp. Now that it’s close to release I thought I’d move over to MySQL and give it a whirl. Problem is the MySQL gem isn’t compatible with 1.9.1, not in the gem install mysql kind of way.
So I turned to the Google and found a number of options and solutions. The one I went with, for no particular reason other than it was a pretty straight forward install, was found over at http://www.tmtm.org/en/mysql/ruby/. This is the MySQL API module for Ruby that works with Ruby 1.9.1.
I found some clarification on the install over here, http://alwaysthecritic.typepad.com/atc/2009/03/install-mysql-gem-on-ruby-191-on-mac-os-x.html.
Once installed, I added the require 'mysql' into the environment.rb file and tada! I was able to create the database through rake and load up the schema without any issues.
One solution that caught my eye is found over at espace. It’s a MySQL driver that “supports threaded access and async operations. This means that you can send queries to a MySQL server in a concurrent manner from Ruby applications. This is big news for those waiting for Rails thread safety.” It only works with Ruby 1.9 though.
