Ruby Tips 11: Install mysql gem on Mac OS X Lion

Balaji D Loganathan

21 sec read

[source]brew install mysql[/source]
Is you have installed mysql server already and have a failed mysql gem, then remove the mysql server first [ see]
Do this to install mysql system tables:
[source]
mysql_install_db –verbose –user=`whoami` –basedir=”$(brew –prefix mysql)” –datadir=/usr/local/var/mysql –tmpdir=/tmp
[/source]
Install mysql gem:
[source]
sudo env ARCHFLAGS=”-arch x86_64″ gem install mysql — –with-mysql-dir=/usr/local/Cellar/mysql –with-mysql-lib=/usr/local/Cellar/mysql/5.5.15/lib/ –with-mysql-include=/usr/local/mysql/5.5.15/include –with-mysql-config=/usr/local/Cellar/mysql/5.5.15/bin/mysql_config
[/source]
To find out what your machine is. use uname -a

Related posts:

One Reply to “Ruby Tips 11: Install mysql gem on Mac OS…”

Leave a Reply

Your email address will not be published. Required fields are marked *