getting rgeo to work with geos 3.3.3

643 views
Skip to first unread message

Andy

unread,
Mar 13, 2013, 3:14:57 PM3/13/13
to rgeo-...@googlegroups.com
Hi Folks,

I'm attempting to setup rgeo on Ubuntu 12.04.  I'm using geos, gdal, proj out of
a personal pacakage repo called ubuntugis:


When running some code, I found that RGeo is not seeing geos:

From within rails console:

irb(main):004:0> RGeo::Geos.supported?
=> false

When I went a hunting down why, I found myself in the 
rgeo gem sources under rgeo-0.3.20/ext/geos_c_impl

I ran ruby extconf.rb to get:


checking for geos_c.h... yes
checking for GEOSSetSRID_r() in geos_c.h... no
checking for GEOSPreparedContains_r() in geos_c.h... no
checking for GEOSPreparedDisjoint_r() in geos_c.h... no
checking for GEOSWKTWriter_setOutputDimension_r() in geos_c.h... no
checking for rb_memhash() in ruby.h... yes
**** WARNING: Unable to find GEOS headers or GEOS version is too old.
**** Compiling without GEOS support.
creating Makefile

When I go hunting in the make file for the functions that are not found they all seem to be there.

Any pointers that might help me out of this?

Thanks in advance.


Andy

unread,
Mar 14, 2013, 9:20:04 AM3/14/13
to rgeo-...@googlegroups.com

Figured this one out.  Turns out there was no link from libgeos.so to libgeos-3.3.3.so
Once I got this in place we're good.

Gilberto Paulo Carmo

unread,
Sep 9, 2013, 4:33:39 PM9/9/13
to rgeo-...@googlegroups.com
Yep. I also have the same issue but with libgeos-3.3.8.so

I am using rvm and ruby-2.0.0.

I had to manually remove the gem rgeo-0.3.20 inside .rvm/gems/ruby-2.0.0-pXXX/gems (you could also do a "gem uninstall rgeo"
then create the sym link inside /usr/lib "ln -s libgeos-3.3.8.so libgeos.so"
and then "gem install rgeo"  again

It worked.
Reply all
Reply to author
Forward
0 new messages