I'm trying to get Schuyler Erle's Ruby-based geocoder (https://github.com/geocommons/geocoder) up and running locally on Mac OS 10.6. Upon calling lib/tiger_import (available at above link) to import Tiger shapefiles into a sqlite db, I get the following error message:
Error: dlopen(bin/../lib/geocoder/us/sqlite3.so, 10): no suitable image found.
Did find: bin/../lib/geocoder/us/sqlite3.so: mach-o, but wrong architecture
Running file lib/geocoder/us/sqlite3.so
does indeed reveal:
lib/geocoder/us/sqlite3.so: Mach-O dynamically linked shared library i386
After plenty of searching, I haven't been able to track down a suitable 64-bit sqlite3.so build. Is this likely to be the cause of my problem? If so, any suggested workarounds? I'm a Ruby/sqlite novice, so I'm sure I'm missing something. Any clues would be appreciated.
After digging around the source code a little, I realized the makefile was explicitly passing "-arch i386" to the C compiler. (Another user independently stumbled on to the same problem and resolution here.) I simply changed the makefile to pass x86_64 instead and it worked like a charm.