简体   繁体   中英

Postgresql + POSTGIS

I'm trying to deploy PostgreSQL + PostGIS for my ruby app. I followthis tutorial , but when I'm typing: CREATE EXTENSION PostGIS the terminal returns,

CREATE EXTENSION postgis;
CREATE : undefined command

my setup:

  • POSTGRESQL 10.4
  • Ruby 2.4.3
  • Rails 5.1.6

Where are you executing CREATE EXTENSION postgis ? This command has to be executed in the database via a PostgreSQL client, such as psql or pgAdmin . What you're getting is an error message from your console, which does not know this command.

Try this from your console:

psql -d yourdatabase -c "CREATE EXTENSION postgis"

Check the psql documentation for more details on how to connect to the database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM