We recently upgraded from ruby 1.8.6 and rails 2.0.2 to 1.8.7/2.1.0 respectively. This guide was incredibly helpful but one small caveat I ran into after the upgrade was related to postgresql.
It seemed that the new postgres_adapter.rb didn’t properly quote several of the commands: drop database and create database.
For example:
def drop_database(name) #:nodoc:
execute "DROP DATABASE IF EXISTS #{name}"
end
should be something like:
def drop_database(name)
execute "DROP DATABASE IF EXISTS \"#{name}\""
end
And same goes for create_databse.
It looks like there are fixes in edge for create_database and drop_database
|
Comment [75] |
— Irene Ros |