My local OS X rgeo configuration seems to be broken and I'm at a loss for how to fix it: it was working at one point,
First, I'm pretty sure postgis is all working correctly. E.g. I'm pretty sure this would fail if it wasn't all working correctly:
psql
oneclick_development=# select ST_GeometryType(geom) from counties where id=21000003;
st_geometrytype
-----------------
ST_MultiPolygon
(1 row)
but in rails console I get this:
2.1.1 :003 > County.where(id: 21000003).first.geom.class
=> String
On one of our heroku instances where all is working correctly, I get the expected behavior of:
irb(main):002:0> County.where(id: 21000003).first.geom.class
=> RGeo::Geos::CAPIMultiPolygonImpl
I use rvm for ruby and homebrew for libgeos and the other libraries. I checked where homebrew has geos installed, and uninstalled & reinstalled the gem, with no effect.
$ /usr/local/bin/geos-config --prefix
/usr/local/Cellar/geos/3.4.2
gem install rgeo -- --with-geos-dir=/usr/local/Cellar/geos/3.4.2 --with-proj-dir=/usr/local/Cellar/geos/3.4.2
(and this shouldn't be necessary anyway, libgeos and other libraries are in /usr/local/lib)
I'm quite stumped at the moment. Suggestions?
Thanks!