Thursday, October 7, 2010

Switching to Snow Leopard, mysql and mongrel problems

for mysql, i had to re-install mysql using the 64bit version.

uninstall previous mysql: http://obscuredclarity.blogspot.com/2009/08/uninstall-mysql-on-mac-os-x.html

install mysql, follow this: http://hivelogic.com/articles/compiling-mysql-on-snow-leopard

use mysql version 5.1.39

for the mysql gem, use this:

> export ARCHFLAGS="-arch i386 -arch x86_64" ;sudo gem install --no-rdoc --no-ri mysql -v 2.7 -- --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config

then..mongrel hangs without error, to fix, use this (thanks Darian Shimy):

> sudo gem uninstall mongrel fastthread
> sudo gem install mongrel

i hope this helps future me and some troubled person out there.

UPDATE:
But wait there's more

to fix ruby-debug
> sudo gem uninstall ruby-debug
> sudo gem uninstall ruby-debug-base
> sudo gem uninstall linecache
> sudo env ARCHFLAGS="-arch x86_64" gem install ruby-debug

not sure if the ARCHFLAGS was necessary..