MySQL Gem in Leopard

Solved MySQL gem installation with this line:

sudo env ARCHFLAGS=”-arch i386″ gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config

Now everything’s good again.

Comments

4 Responses to “MySQL Gem in Leopard”

  1. Allan on October 29th, 2007 6:22 pm

    I’m still having problems with this under leopard, most likely because i’m a noob :-(

    I’ve run the above line in terminal several times, but I keep getting a “Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers” along with other messages after choosing to install 2.7 (ruby).

    Again, I am a noob on this and I’m not sure if I’m supposed to compile mysql from source as your post suggested earlier.

    I like ruby on rails because it keeps me from having to learn much of the underlying stuff, it lets me get to the juicy portions of just building stuff and running with it. However, I know that it’s good to know the underlying stuff as well, so any advice you may give on getting this particular gem installed would be most appreciated.

    Thanks in advance (fingers crossed for luck)!

  2. Joon on October 29th, 2007 6:39 pm

    Where did you install mysql? Just make sure you installed correctly to /usr/local/mysql and the bin directory is there.

  3. Allan on October 30th, 2007 3:39 pm

    I’m such a noob – I didn’t know I still had to install the mysql binaries for the necessary headers and libraries :-(

    Thank you for responding, I will keep your advice in mind as I try to install mysql properly :-)

  4. Note to Self » Blog Archive » Mysql gem on OS X Leopard on July 27th, 2008 9:04 am

    [...] the mysql gem for Ruby is almost always a mess, as witnessed by the large number of hits one get when googling for “mysql gem leopard”.  To make the gem work with your [...]

Powered by Olark