@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"

Trying to debug this. If I use `activerecord-postgis-adapter`, with this very 
same code, I get this warning and error:

```
$ bin/rails test test/models/geoblock_zone_test.rb
Running 1 tests in a single process (parallelization threshold is 50)
Run options: --seed 64084

# Running:

unknown OID 147959: failed to recognize type of 'zone'. It will be treated as 
String.
E

Error:
GeoblockZoneTest#test_falls_within_any:
TypeError: Cannot visit RGeo::Cartesian::PointImpl
    app/models/geoblock_zone.rb:38:in 'GeoblockZone.falls_within_any?'
    test/models/geoblock_zone_test.rb:10:in 
'GeoblockZoneTest#test_falls_within_any'
```

However if I don't have this problem in a new Rails app, with same gem 
versions, model, migration, and test.

So there's something in our gems or config that is interfering with 
`activerecord-postgis-adapter` but has no issues with `activerecord-postgis`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6713#discussion_r2717352693
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

Reply via email to