ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near "SUPPORT" : CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public
salmanhaseeb opened this issue · 1 comments
I am integrating PostGIS in an already built rails application with postgres and following their documentation https://github.com/rgeo/activerecord-postgis-adapter.
At this step
rake db:gis:setup
I get the following error.
ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near "SUPPORT" : CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public
My database.yml
default: &default
adapter: postgis
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
<<: *default
database: myapp_development
test:
<<: *default
database: myapp_test
production:
<<: *default
database: myapp_production
username: myapp_user
password: <%= ENV['myapp_DATABASE_PASSWORD'] %>`
I would check your postgres/postgis version. Seems like it's an issue with that and not the gem.
Might be related to this https://stackoverflow.com/questions/59142768/postgresql-syntax-error-at-or-near-support-on-updating-postgis-extension