Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issue after bundle exec rake db:migrate command #2849

Closed
Tagort opened this issue Sep 24, 2020 · 1 comment
Closed

Installation issue after bundle exec rake db:migrate command #2849

Tagort opened this issue Sep 24, 2020 · 1 comment
Labels
support A user needs help setting up their development environment

Comments

@Tagort
Copy link

Tagort commented Sep 24, 2020

I am having proplem with installation of openstreetmap-website. After i enter command migration fails with this errors:

== 20170222134109 AddUserIndexes: migrating ===================================
-- add_index(:oauth_tokens, [:user_id])
   -> 0.0068s
-- add_index(:client_applications, [:user_id])
   -> 0.0059s
== 20170222134109 AddUserIndexes: migrated (0.0149s) ==========================

== 20180204153242 TileUsers: migrating ========================================
-- add_column(:users, :home_tile, :bigint)
   -> 0.0043s
-- add_index(:users, [:home_tile], {:name=>"users_home_idx"})
   -> 0.0060s
== 20180204153242 TileUsers: migrated (0.0168s) ===============================

== 20181020114000 AddUserTouAgreed: migrating =================================
-- add_column(:users, :tou_agreed, :datetime)
   -> 0.0044s
== 20181020114000 AddUserTouAgreed: migrated (0.0054s) ========================

== 20181031113522 CreateDelayedJobs: migrating ================================
-- create_table(:delayed_jobs, {:force=>true})
   -> 0.0162s
-- add_index(:delayed_jobs, [:priority, :run_at], {:name=>"delayed_jobs_priority"})
   -> 0.0061s
== 20181031113522 CreateDelayedJobs: migrated (0.0245s) =======================

== 20190518115041 AddAclIndexes: migrating ====================================
-- add_index(:acls, :domain)
   -> 0.0074s
-- add_index(:acls, :address, {:using=>:gist, :opclass=>:inet_ops})
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedObject: ERROR:  operator class "inet_ops" does not exist for access method "gist"
/home/osm/openstreetmap-website/db/migrate/20190518115041_add_acl_indexes.rb:4:in `change'
/home/osm/.rbenv/versions/2.5.8/bin/bundle:23:in `load'
/home/osm/.rbenv/versions/2.5.8/bin/bundle:23:in `<main>'

Caused by:
ActiveRecord::StatementInvalid: PG::UndefinedObject: ERROR:  operator class "inet_ops" does not exist for access method "gist"
/home/osm/openstreetmap-website/db/migrate/20190518115041_add_acl_indexes.rb:4:in `change'
/home/osm/.rbenv/versions/2.5.8/bin/bundle:23:in `load'
/home/osm/.rbenv/versions/2.5.8/bin/bundle:23:in `<main>'

Caused by:
PG::UndefinedObject: ERROR:  operator class "inet_ops" does not exist for access method "gist"
/home/osm/openstreetmap-website/db/migrate/20190518115041_add_acl_indexes.rb:4:in `change'
/home/osm/.rbenv/versions/2.5.8/bin/bundle:23:in `load'
/home/osm/.rbenv/versions/2.5.8/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

It may look like i forgot to do psql -d openstreetmap -c "CREATE EXTENSION btree_gist" command before start migrations, but it's not that.

@tomhughes
Copy link
Member

Well you may have done that, but the database you are migrating is definitely missing the extension, so either you're not running against the database you think you are or something has removed it again, or recreated the database, since you ran that.

@tomhughes tomhughes added the support A user needs help setting up their development environment label Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support A user needs help setting up their development environment
Projects
None yet
Development

No branches or pull requests

2 participants