May 31, 2010


Filed under: django, macports, mamp, mysql, mysqldb, osx — michaelangela @ 7:29 am

For my overly customized MAMP install, it wasn’t pretty. I forget why it’s actually set up this way now but the different parts didn’t like each other and it took quite a while to get it working. Not fun. But fortunately there were those who had gone before me and it wasn’t hard in the end. It just took a long time.



Correction. It just took a really REALLY long time. The reason? You need to have libs and headers and such in places that all make sense for everything to compile. (This is the SHORT version.) So MacPorts to the rescue. Install py25-mysql, copy some files around, use a slightly different “HOST” setting for the database connection and you’re good to go. But installing py25-mysql installs ALL the dependencies needed in order to get that running. Which is good when that’s what you need. Which is what took a long time. But at least it was a one command thing and not hopping all over the ‘net to find and install things as I was very close to doing.

And that bit about the unique “HOST” setting for mine turns out to be

DATABASE_HOST = ‘/Applications/MAMP_1.7.2/tmp/mysql/mysql.sock’


May 27, 2010

Ruby, OS X, MAMP, MySQL, do_mysql and getting it installed

Filed under: install, mysql, osx, ruby, tip — michaelangela @ 7:33 am

This took a lot of time. In hopes that this will help someone else, I add this link.

How to install the MySQL/Ruby gem on Mac OS X Leopard

Here’s the situation. I have MAMP. For legacy reasons my current MAMP 1.7.2 is in a custom directory. I use ruby. In particular I wanted to use DataMapper in a project with ruby. I wanted to use it with MySQL. That requires do_mysql. It just would not install with all kinds of errors. Well one in particular. It complained of possibly missing headers or libraries. After a long search the above link surfaced from the depths of Google. It almost worked for me. Everything but the last command actually. So for me, the command I ended up using is something like:

sudo env ARCHFLAGS=”-arch i386″ gem install mysql — –with-mysql-dir=/Applications/MAMP_1.7.2/Library –with-mysql-include=/Applications/MAMP_1.7.2/Library/include/mysql –with-mysql-config=/Applications/MAMP_1.7.2/Library/bin/mysql_config

This is OS X 10.5.8 Leopard

Blog at WordPress.com.