MySQL Gem 2.8.1 on MacOSX Lion

Just because I keep googling it:

To install MySQL 2.8.1 on OS X Lion

1.

export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"

2.

env ARCHFLAGS="-arch x86_64" sudo gem install mysql -v='2.8.1' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config

Thanks Stackoverflow