Ruby DB2 on Win32

It turns out that the hardest part about porting Ruby DB2 from Unbuntu to Windows was getting a compilation environment set up.  These instructions contained the key.

Additionally, it appears that the tests I based this port on have been updated, but resynching is a problem for another day.  Reverting the tests back to the beginning of the year is a simple matter of executing the following in the pecl/ibm_db2/tests directory:

cvs update -D 2006/01/01

Once that was out of the way, the changes were rather mundane:

-ldb2=>db2cli.lib
make=>nmake
.so=>.dll
open(foo)=>open(foo,'rb')
\r\n=>\n

The result works on both Ubuntu and Windows XP.


I was going to post about YAML requiring two spaces for indentation, but I glanced at the spec and I seem to be wrong. Learn something new everyday...

Posted by Daniel at

Add your comment












Nav Bar