Ever in Flux Adding noise to the intersphere.

13Mar/100

Installing the Ruby/MySQL gem on Snow Leopard server

This is a follow-up to the last post about installing the Ruby/MySQL gem on Leopard Server.

Following the steps for downloading and installing the MySQL headers provided by Apple, I was able to compile and successfully utilize the mysql gem without having to resort to third-party software like MacPorts or Sun's MySQL. This was done because of a project I am working on.  I wanted to keep the server as close to stock as possible.

While that worked for Leopard, I needed to do the same for Snow Leopard Server since the project may move to a newer server.  So, I followed the steps in Technical Article 25017 and retrieved the MySQL binaries for Mac OS X 10.6.1 (last version to have changes to MySQL).  After untarring the binaries and installing the gem, Rails would fail every time it had to access the MySQL database.

A combination of FLAGS and command line switches is necessary to get the gem to compile properly:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql


Having done that, the gem compiled and installed, my Rails app functions correctly and I didn't have to install any additional software beyond the gem itself.  Downside of this method, however, is that MySQL is still frozen in an older version and there is no way of telling when Apple will update it.

Also, the Apple-supplied documentation for Deploying Rails Applications on Mac OS X Leopard is incredibly out-of-date and should be avoided until it's updated for Snow Leopard.

About Bean

Just another evolving ape on this rock we call Earth.
Filed under: Personal Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.

Bear