Thursday, September 18, 2008

mysql gem on leopard

There are many posts on the subject, but this one works flawlessly:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Here is a link to the post where I got this from.

If you try to use the gem, it might fail (which means you have been trying to install it before you read this post.) No problem, there is a short cut to fix it. Look for the gem files here:

/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle
/Library/Ruby/Gems/1.8/gems/mysql-2.7/mysql.bundle

Delete the first bundle. It got copied twice.

Don't ask me why it works but it does.

No comments: