RUBY数据迁移 RAKE ABORTED
ruby 数据迁移中
我新建了一个001
class CreateProducts < ActiveRecord::Migration
def self.up
create_table :products do |t|
t.column :title, :string
t.column :name, :text
t.column :image_url, :string
end
end
def self.down
drop_table :products
end
end
创建002侯..迁移时
运行的时候弹:
rake aborted
you have a nil object when you didn't expect it
you may have expected an instant of Array.
the error occured while evaluating nil.[]
[解决办法]
楼主,我也遇到了这个问题,你解决了没有?如果解决了把原因帖出来帮小弟一把。谢谢!
[解决办法]
lz要干嘛?
[解决办法]
不知,帮顶