2

I updated Rails version to 4.2 and then my test are failing when Rgeo gem is used. It seems that there is something wrong with the attributes types on the tables.

can't cast RGeo::Geographic::SphericalPointImpl to point

Following this link http://nts.strzibny.name/fix-cant-cast-rgeogeographicsphericalpointimpl-to-point, I changed t.point to t.geography on the database schema, but Nothing new happened.

Postgres version: 9.5 (also tried with 9.4.8) Postigs version: 2.2 (also tried with 2.1.8)

Any thoughts?

boulder_ruby
  • 38,457
  • 9
  • 79
  • 100
matiasdim
  • 527
  • 5
  • 14
  • Not sure if this helps, but you can just do migrations using the `spatial` type to include all types of geographies and this issue might not surface. If you wanted to prevent certain types of geometries from going into columns you could then use ActiveRecord validators that limit the geometry type for a given column. – boulder_ruby Jul 16 '16 at 17:59

0 Answers0