I was having some issues with some missing methods in my Geos::LinearRing class that none of my coworkers could reproduce. We eventually tracked the issue down to lib/ffi-geos/geometry.rb:425, which checks the Geos::GEOS_VERSION value. On my machine which was running Geos version 3.6.2-CAPI-1.10.2 4d2925d6, Geos::GEOS_VERSION was returning 0.0.0, whereas on my coworker's machine, which was running Geos version 3.6.1-CAPI-1.10.1 r0, Geos::GEOS_VERSION was returning 3.6.1.
We tracked that down to the VersionConstants module in lib/ffi-geos.rb. The regex that parses out the version doesn't support those trailing hex digits.
Making that last r optional (r+) and changing the last \d to a \h fixes the issue for me. For context, I installed geos via homebrew (as opposed to by building from some random commit on GitHub), so I would've expected the version string to be acceptable.
Hi,
I was having some issues with some missing methods in my
Geos::LinearRing
class that none of my coworkers could reproduce. We eventually tracked the issue down tolib/ffi-geos/geometry.rb:425
, which checks theGeos::GEOS_VERSION
value. On my machine which was running Geos version3.6.2-CAPI-1.10.2 4d2925d6
,Geos::GEOS_VERSION
was returning0.0.0
, whereas on my coworker's machine, which was running Geos version3.6.1-CAPI-1.10.1 r0
,Geos::GEOS_VERSION
was returning3.6.1
.We tracked that down to the
VersionConstants
module inlib/ffi-geos.rb
. The regex that parses out the version doesn't support those trailing hex digits.Making that last
r
optional (r+
) and changing the last\d
to a\h
fixes the issue for me. For context, I installedgeos
via homebrew (as opposed to by building from some random commit on GitHub), so I would've expected the version string to be acceptable.Thanks!