Ruby BDB and You.
I just got through tearing my hair out to get this to work finally. I hope that this is useful to anyone out there that doesn’t want to install ruby from MacPorts and already has the latest BerkeleyDB installed.
The problem is that to install the ruby BDB bindings you need to build it from source. I used 0.6.5 from ftp://moulon.inra.fr/pub/ruby/. If you have bekeley db installed somewhere then all you need to know is where the lib directory is and the include directory is. For me they were:
—with-db-lib=/usr/local/BerkeleyDB.4.7/lib
—with-db-include=/usr/local/BerkeleyDB.4.7/include
Since this the lib and include directories are both in that location I sort cut this by using:
—with-db-dir=/usr/local/BerkeleyDB.4.7
This should have worked, but there is one thing that I missed:
env ARCHFLAGS=”-arch i386”
I picked this up somewhere and it stopped the stupid errors about not finding db_version for ppc. The final command to get you off the ground is:
env ARCHFLAGS=”-arch i386” ruby extconf.rb —with-db-dir=/usr/local/BerkeleyDB.4.7