Upgrading MySQL and Rails for Snow Leopard

After upgrading  to Snow Leopard, I had a true 64 bit OS. This forced me to upgrade MySQL and the mysql ruby gems.

1. Install the 64 bit version of MySQL. I installed mysql-5.1.40-osx10.5-x86_64. The install updated your /usr/local/mysql link. It leaves your older version of mysql in place. I was running a 32 bit version before.

2. I removed all my old mysql gems using the command “sudo gem uninstall mysql”

3. Rebuild your mysql gem using the command:
env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

For the future, any native gems need to be built with the flags “env ARCHFLAGS=”-arch x86_64″.

The included Preferences Panel is still 32 bit. When you open it, the System Preferences goes into 32 bit mode. Lets hope it gets fixed soon.

Advertisements

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: