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
225●21●22●26
accept rate: 0%
edited 24 Oct '11, 14:45

TomH ♦♦
3.3k●8●39●43
@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. http://pastebin.com/VMvsNk9S
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.
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 https://help.openstreetmap.org/questions/8630/osmosis-stops-with-error-insert-or-update-on-table-current_way_nodes-violates-foreign-key-constraint-current_way_nodes_node_id_fkey