Thursday, January 10, 2008

Installing MySQL driver gem

I have upgraded MySQL from 5.0.27, which I installed about a year ago when I bought MacBook, to 5.0.45 yesterday. The reason is that I learned from a MySQL users group meeting that there are lots of important fixes in the versions above 5.0.30.

In Ruby on Rails 2.0, it is recommended to install MySQL driver gem because the one that comes with Rails is not for production use. The gem command is described in config/database.yml.
i.e. On Mac OS X 10.5 Leopard,
sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Previously, installing MySQL driver gem had failed. I tried it again today now that I have the latest 5.0 version of MySQL. Then the installation was successful.

No comments: