Working As Intended

Fixing the MySQL Ruby Gem on OS X 10.4

March 3rd 2010

Yes, there are a billion posts about this very topic. I’ve installed this gem many times, and it’s always annoying. Rather than go through the hassle of installing the gem, watching the compile fail, fixing the ulong define in the gem source code, regenerating the Makefile, and then making the gem again, there’s an easier way.

In “/usr/local/mysql/include/typelib.h” (or wherever you have MySQL installed), add the following.

#define ulong unsigned long

Now the gem command should work fine.

$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
blog comments powered by Disqus

Feed Feed