我正在尝试对我的数据库进行更改,并首先在我的 locahost 中对其进行测试。谁能看到我的错误是什么?
在 lib/tasks/update.rake 中:
namespace :update do
desc "Update country"
task :country_fix => :environment do
Guideline.where(:hospital => 'Maine Medical Center, Maine').each do |t|
t.update_attributes(hospital: 'Maine Medical Center')
end
end
end
当我跑
rake update:country_fix
它给出了一条看起来像(带有--trace)的错误消息......
** Invoke update:country_fix (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute update:country_fix
rake aborted!
Connection refused - connect(2)