Skip to content

Instantly share code, notes, and snippets.

@ddd1600
Created September 12, 2013 02:14
Show Gist options
  • Select an option

  • Save ddd1600/6532411 to your computer and use it in GitHub Desktop.

Select an option

Save ddd1600/6532411 to your computer and use it in GitHub Desktop.
install postgis on postgresql on rails on mac -- working
To get PostGIS running on mac with postgres.app on rails----
- update XCode
- brew install postgis
- gem install rgeo -- --with-geos-dir=/usr/lib
- database.yml should look like:
development:
adapter: postgis
encoding: unicode
postgis_extension: true
schema_search_path: public,postgis
pool: 5
database: gisdatabase
host: localhost
- go into psql: `psql gisdatabase` (DO NOT JUST GO INTO PSQL, SELECT THE DATABASE YOU’RE USING, IT WON’T WORK OTHERWISE)
DROP EXTENSION PostGIS; (if exists)
CREATE SCHEMA postgis;
CREATE EXTENSION PostGIS WITH SCHEMA postgis;
GRANT ALL ON postgis.geometry_columns TO PUBLIC;
GRANT ALL ON postgis.spatial_ref_sys TO PUBLIC;
*** it should work ***
AND
gem install ffi-geos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment