Skip to content

Postgis & Rails (rgeo) Installation

Fernando Uval edited this page Sep 25, 2020 · 1 revision

Specs:

Ubuntu 16.04 Rails 6.0.2.2

Postgis:

  • sudo apt install postgis postgresql-9.5-postgis* (check version number)
  • check: find /usr -name postgis.control

Rgeo y activerecords:

  • sudo apt install libgeos-dev
  • gem install rgeo
  • gem install rgeo-activerecord
  • gem install activerecord-postgis-adapter

psql database we want Gis:

  • CREATE EXTENSION postgis;

Refrerences

GET RECORDS

https://postgis.net/docs/ST_Contains.html