LogoLogo
  • Hatchbox Classic Support
  • Clusters
  • Providers
  • Servers
  • Apps
    • ActionCable
    • Background Workers
    • Backups
    • BitBucket
    • Cron Jobs
    • Deploy Scripts
    • Domains & DNS
    • ElasticSearch
    • File Uploads
    • Image Processing
    • Jekyll
    • Passenger
    • Postgres
    • Puma
    • Rails
    • Rake
    • React On Rails
    • Ruby Versions
    • Sitemaps
    • Sphinx
    • SSL
    • Webhooks & Auto-Deploy
    • Webpacker
  • Security
  • Support
  • Databases
    • Backup & Restore
Powered by GitBook
On this page
  1. Apps

Postgres

How can I enable PostGIS?

You'll need to install Postgis:

sudo apt-get install postgis postgresql-13-postgis-3-scripts

Then create the extension:

$ sudo su postgres
$ psql
psql (10.4 (Ubuntu 10.4-2.pgdg16.04+1), server 9.6.9)
Type "help" for help.

postgres=# CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;
CREATE EXTENSION
CREATE EXTENSION
postgres=# \q

Last up, change your DATABASE_URL env var to start with postgis:// instead of postgresql://

PreviousPassengerNextPuma

Last updated 4 years ago