-
-
Notifications
You must be signed in to change notification settings - Fork 246
Common Errors
Sameer S edited this page Sep 17, 2015
·
1 revision
Welcome to the activerecord-postgis-adapter wiki!
This page lists some common gotchas.
Geometry or geography types do not exist
This error might manifest itself as something like
ERROR: type "geography" does not exist
or
ERROR: type "geometry" does not exist
On my OSX installation, where I already had Postgres 9.4 prior to installing Postgis via Brew, the issue was that some of the installation steps for initializing the database do not happen automatically.
You might be able to solve this by re-installing everything if that's a not-inconvenient option for you.
However, you can also explicitly run these initializations like so:
- Locate the Postgis initialization files using the steps on this tutorial
- Run the file
postgis.sql
first, like so:psql -d <databasename> -f <path to postgis.sql>/postgis.sql
- Do the same to run
spatial_ref_sys.sql
Voila! This error should now go away.