NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm trying to install the rail port. THis is the command i received an error.
env RAILS_ENV=production rake db:migrate

This is my error:

-- add_index("changesets", ["min_lat", "max_lat", "min_lon", "max_lon"], {:method=>"GIST", :name=>"changesets_bbox_idx"})
rake aborted!
An error has occurred, this and all later migrations canceled:

PGError: ERROR: data type integer has no default operator class for access method "gist" HINT: You must specify an operator class for the index or define a default operator class for the data type. : CREATE INDEX "changesets_bbox_idx" ON "changesets" USING GIST ("min_lat", "max_lat", "min_lon", "max_lon")

Tasks: TOP => db:migrate (See full trace by running task with --trace)

I tried deleting the databases and create them all over again but i still get this error. I'm 100% sure i didn't missed the psql -d openstreetmap < /usr/share/postgresql/8.4/contrib/btree_gist.sql part.

asked 24 Oct '11, 09:15

alexz's gravatar image

accept rate: 0%

edited 24 Oct '11, 14:45

TomH's gravatar image

TomH ♦♦

Well I'm 100% sure that you did miss that step, as that is exactly the error you will get if you haven't added that contrib module.

permanent link

answered 24 Oct '11, 14:44

TomH's gravatar image

TomH ♦♦
accept rate: 20%

@Tomh, thanks for your input! I tried it once more to configure my db, beginning with table creation. This is my full copy-paste result from the terminal to demonstrate that the error still persists.

(24 Oct '11, 15:06) alexz

So you have created three databases, but have only installed the btree_gist code in one of them. Presumably a different one to the one you are migrating, but I would need to see your database.yml to be sure.

(24 Oct '11, 15:08) TomH ♦♦

Thank you! That worked. I didn't realise i had to execute that command for every db. But i have an error with osmosis now. If you are competent with it and want to help out, please see this post

(25 Oct '11, 08:19) alexz

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 24 Oct '11, 09:15

question was seen: 5,208 times

last updated: 25 Oct '11, 08:19

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum