I had recently upgraded my MacBook Pro to OS X 10.6 Snow Leopard, and I was in the process of reinstalling most of the ruby gems. The geoip_city gem was the only one that gave me a bit of trouble, so I figured I'd post how I got it working.
- Go here and download the latest source for the GeoIP C api
- Untar the source, cd into the directory
- Then run
make && sudo make install
- Finally, run
sudo env ARCHFLAGS="-arch x86_64" gem install geoip_city -- --with-geoip-dir=/opt/GeoIP
The key is the
ARCHFLAGS parameter in the last step. This indicates the native extensions are to be built for a 64 bit architecture.
Also, if you need the free GeoIP City Lite database, you can find it here. I hope this helps.