[OSM-dev] rake db:migrate error

Pallinger Péter pallinger at dsd.sztaki.hu
Wed Oct 7 12:49:46 BST 2009


Hello everyone,

I am new to (running) OSM, but would very like to use it in a project.
However, I have the following error when running rake db:migrate (after some success
messages for former tasks):


==  ChangeUserLocale: migrating ===============================================
-- remove_foreign_key(:users, [:locale], :languages, [:code])
rake aborted!
An error has occurred, all later migrations canceled:

Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'CONSTRAINT
users_locale_fkey' at line 1: ALTER TABLE users DROP CONSTRAINT users_locale_fkey

(See full trace by running task with --trace)


I am using ubuntu 9.04 x86_64, more specifically:
	rake: version 0.8.1
	ruby: 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
	gem: 1.3.1
	mysqld: Ver 5.0.75-0ubuntu10.2
	rails_port: revision 18005


In the wiki (http://wiki.openstreetmap.org/wiki/The_Rails_Port), I found a suggestion to
do a "sudo gem update --system", but that does not work on ubuntu/debian (I would have
to compile gem myself).

Does anyone know how to fix this without having to compile gem? It is not even sure,
that that would solve it, as gem is pretty recent on my machine (fits the version
constraint given in the wiki).

Thanks in advance,
	PP




More information about the dev mailing list