tags:

views:

48

answers:

1

Hi there,

I've been going stir crazy trying to install the ruby mysql gem here, and I'm writing here so if anyone else is in this ridiculous situation, they don't have to go through the same pain as me.

What are the common gotchas when installing the mysql gem onto a fresh copy of Leopard?

In this case, I'm using

Leopard - OS 10.5.7 The stock version of Ruby - 1.8.6 Rubygems 1.3.5 The 32bit version of 5.1.36 Mysql, installed using the GUI installer.

I've dumped all the relevant config info here for my machine as a starter:

http://gist.github.com/158662

What info helps here, and what would I need to do?

I'm explicitly calling the i386 archiecture for the build, and tellign with where mysql is:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- \
 --with-mysql-dir=/usr/local/mysql \
 --with-mysql-lib=/usr/local/mysql/lib \
 --with-mysql-include=/usr/local/mysql/include

I've tried following instructions here, here, and here

+1  A: 

The ruby mysql gem doesn't like the 64-bit version on Leopard. If you can, downgrade.

Then you should call the sudo gem install mysql with the options (change it to your path):

--with-mysql-dir=/usr/local/mysql 
--with-mysql-lib=/usr/local/mysql/lib 
--with-mysql-include=/usr/local/mysql/include

Worked for me. (The blog post which help me is in German, might help you anyway.)

http://www.code-schubser.de/2008/12/05/mysql-gem-unter-macosx-leopard-installieren/

Beffa
H Beffa,I'm running mysql 5.1.36, and I'm currently using the 32bit section.
Chris Adams
I'm such an epic retard. I've just seen I've been symlinking to the 64 bit version instead of the 32 bit version all morning.Thanks.
Chris Adams