From: zig Date: 2007-02-06T13:35:13+09:00 Subject: Re: mysql-ruby won't connect On Jan 1, 11:48 pm, ziggur...@gmail.com wrote: > I'm trying to get my first ruby box set up. I'm so far unable to > connect to the mysql database with mysql-ruby. > > I'm on an Intel Mac, running macosx tiger 10.4.8. At first, I couldn't > even compile the plugin, there is some bug in the software. It gave an > error like > > mysql.c: In function 'Init_mysql': > mysql.c:2015: error: 'ulong' undeclared (first use in this function) > > After googling around, I found that this error is known, and can be > fixed by simply declaring that variable in mysql.c. Seehttp://www.maxdunn.com/typo/articles/2006/12/12/installing-mysql-gem-... > orhttp://typo.pburkholder.com/articles/tag/macosx > orhttp://www.planetrubyonrails.org/show/feed/11 > for details. > > After declaring that variable For the sake of completeness and self-containedness, let me type in what the fix was that was linked in those blogs. To resolve the mysql.c: In function 'Init_mysql': mysql.c:2015: error: 'ulong' undeclared (first use in this function) error, the workaround to this bug is to add the line #define ulong unsigned long to mysql.c near the top with the other preprocessor defs. I can confirm that this fix enabled me to successfully compile the software. But see Mat's post later in this thread for what is probably a better fix.