Gem installation fails on FreeBSD because the Makefile for the Ruby/C glue only looks for /usr/include/sqlite3.h and /usr/lib/libsqlite.so. On FreeBSD, the locations are /usr/local/include/sqlite3.h /usr/local/lib/libsqlite3.so and because sqlite3 is installed through the ports system.