我试图对我的数据库进行更改,并首先在我的locahost中对其进行测试。任何人都可以看到我的错误是什么?使用名称空间更新数据库迁移
在LIB /任务/ 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)
谢谢。答案相当愚蠢。我没有开始solr。感谢您帮助我解决问题。 – tessad 2013-03-18 00:20:59