MySQL and Ruby on Rails

July 20th, 2005

Yes, I have been playing with Ruby on Rails and loving it quite a bit. Though, I couldn’t get the msyql add-on to just compile. For some reason I would get the error:

/usr/local/lib/ruby/1.8/powerpc-darwin7.8.0/ruby.h:61: header file 'alloca.h' not found

So, to fix it, I had to edit the file /usr/local/lib/ruby/1.8/powerpc-darwin7.8.0/config.h and remove the line:

#define HAVE_ALLOCA_H 1

Since the Mac OS X, doesn’t have alloca.h.

After that, it compiles just fine. Now, why this was broken in the first place? no idea.