Ruby on rails 雷克流产了!行动:“获取更多”
当我运行rake任务时,我得到以下错误。有人能帮我吗 错误 我的Rake代码Ruby on rails 雷克流产了!行动:“获取更多”,ruby-on-rails,ruby,mongodb,rake,moped,Ruby On Rails,Ruby,Mongodb,Rake,Moped,当我运行rake任务时,我得到以下错误。有人能帮我吗 错误 我的Rake代码 MyCollection.where(:name => "abc").each do |comp| l = open(comp.logo_url) comp.logo = l comp.save! end 提前感谢尝试使用您的收藏。我的收藏量大吗?很可能就是这样。查看有关此错误的相关讨论,是的,它是巨大的。有什么可能的方法来处理这个问题吗?我没有在批处理中使用find\u,但代码修改为一次使
MyCollection.where(:name => "abc").each do |comp|
l = open(comp.logo_url)
comp.logo = l
comp.save!
end
提前感谢尝试使用您的收藏。我的收藏量大吗?很可能就是这样。查看有关此错误的相关讨论,是的,它是巨大的。有什么可能的方法来处理这个问题吗?我没有在批处理中使用find\u,但代码修改为一次使用有限的数据。它工作正常。由于从数据库检索到大量数据,因此发生错误。同时部分检索数据并执行activity.MyCollection.where:name=>abc.limit50.each do | comp | l=opencomp.logo_url comp.logo=l comp.save!批次中的endfind_不是Mopped方法。它只是ActiveRecord
MyCollection.where(:name => "abc").each do |comp|
l = open(comp.logo_url)
comp.logo = l
comp.save!
end