Created
September 12, 2013 02:14
-
-
Save ddd1600/6532411 to your computer and use it in GitHub Desktop.
install postgis on postgresql on rails on mac -- working
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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