Skip to content
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:

  1. Locate the Postgis initialization files using the steps on this tutorial
  2. Run the file postgis.sql first, like so: psql -d <databasename> -f <path to postgis.sql>/postgis.sql
  3. Do the same to run spatial_ref_sys.sql

Voila! This error should now go away.

Clone this wiki locally