From 565292cb6b013a7c3feb37f8640deb3960932b8a Mon Sep 17 00:00:00 2001 From: Jeffrey Chupp Date: Tue, 23 Nov 2010 13:46:31 -0500 Subject: [PATCH] quotes filename to allow postgresql db:test:clone_structure to work with directories with spaces in the path --- .../lib/active_record/railties/databases.rake | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 1fbc8a1..bc25dfe 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -403,7 +403,7 @@ namespace :db do ENV['PGHOST'] = abcs["test"]["host"] if abcs["test"]["host"] ENV['PGPORT'] = abcs["test"]["port"].to_s if abcs["test"]["port"] ENV['PGPASSWORD'] = abcs["test"]["password"].to_s if abcs["test"]["password"] - `psql -U "#{abcs["test"]["username"]}" -f #{Rails.root}/db/#{Rails.env}_structure.sql #{abcs["test"]["database"]}` + `psql -U "#{abcs["test"]["username"]}" -f "#{Rails.root}/db/#{Rails.env}_structure.sql" #{abcs["test"]["database"]}` when "sqlite", "sqlite3" dbfile = abcs["test"]["database"] || abcs["test"]["dbfile"] `#{abcs["test"]["adapter"]} #{dbfile} < #{Rails.root}/db/#{Rails.env}_structure.sql` -- 1.7.2