@pablobm commented on this pull request.
> @@ -6,7 +6,8 @@ source "https://rubygems.org"
gem "rails", "~> 8.1.0"
gem "turbo-rails"
-# Use postgres as the database
+# Use postgres+postgis as the database
+gem "activerecord-postgis-adapter"
The last issue was probably me. I think I had forgotten at one point to set
`adapter: postgis`. Summary:
- `activerecord-postgis-adapter`: "classic" gem, 15 years old. Requires setting
`adapter: postgis` which as I just illustrated can be a headache. Doesn't work
well when using geography-enabled functions such as `ST_Covers`. Does work well
with `ST_Contains`. Works with Ruby 3.2, probably lower but I haven't checked.
- `activerecord-postgis`: very recent gem, 1 year old, only discovered it by
accident. Doesn't require changing `config/database.yml`. Works with
geography-enabled functions such as `ST_Covers` interpolating `?`, but not with
Arel (can be added though). Requires Ruby 3.3 minimum (although as mentioned
Ruby 3.2 is about to enter EOL). Claims not to be based on monkeypatching in
comparison to the competition (I haven't looked into this).
My preference is for the newer gem, if only because of the `database.yml` thing
that does bother me, but I appreciate is only a short term thing. I'm sensing
that dropping Ruby 3.2 would be on the cards for maintainers?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6713#discussion_r2736128103
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6713/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev