Skip to content

Commit

Permalink
Merge pull request #368 from januszm/fix/require_geos_c_fallback
Browse files Browse the repository at this point in the history
Use require as a fallback to load geos_c_impl
  • Loading branch information
keithdoggett committed Feb 9, 2024
2 parents b931b95 + cdd8f7e commit 52d4240
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -2,4 +2,6 @@

source "https://rubygems.org"

gem "base64"

gemspec
8 changes: 7 additions & 1 deletion lib/rgeo/geos.rb
Expand Up @@ -26,7 +26,13 @@ module Geos
begin
require_relative "geos/geos_c_impl"
rescue LoadError
# continue
# fall back to a system-wide search if the c-extension is stored in different location
# important for systems such as Amazon Linux
begin
require "geos/geos_c_impl"
rescue LoadError
# continue
end
end
CAPI_SUPPORTED = RGeo::Geos.const_defined?(:CAPIGeometryMethods)
if CAPI_SUPPORTED
Expand Down

0 comments on commit 52d4240

Please sign in to comment.