0
votes

I have some trouble with postgis. I use rails 4, and I'm on mac osx sierra 10.12.

I have a superuser ekylibre for postgis and I have a file database.yml with this information:

default: &default
  adapter: postgis
  encoding: unicode
  pool: 5
  postgis_extension: []
  schema_search_path: public,postgis
  username: ekylibre
  password: ekylibre
  host: 127.0.0.1

When I try to run:

rake db:create

I have this error :

ActiveRecord::StatementInvalid: PG::UndefinedFile: ERROR: could not open extension control file "/usr/local/Cellar/[email protected]/9.5.7/share/[email protected]/extension/postgis.control": No such file or directory

I have postgis of course. I used homebrew to install postgis. Someone have a solution or a track? Thank's you.

1

1 Answers

0
votes

When we used postgis adapter, we created postgis extensioin for our databases manually:

$ psql -c your_database_name
$ CREATE_EXTENSION postgis

and also I'm not sure about theese strings at your database.yml

postgis_extension: []
schema_search_path: public,postgis

I think, you can drop them.