xxxxxxxxxxxxxx✗ rake db:seed
schools data init.
rake aborted!
ActiveRecord::SubclassNotFound: The single-table inheritance mechanism failed to locate the subclass: '全日制'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite School.inheritance_column to use another column for that information.
/home/sog/.rvm/gems/[email protected]/gems/activerecord-5.0.0.1/lib/active_record/inheritance.rb:182:in `rescue in find_sti_class'
/home/sog/.rvm/gems/[email protected]/gems/activerecord-5.0.0.1/lib/active_record/inheritance.rb:175:in `find_sti_class'
/home/sog/.rvm/gems/[email protected]/gems/activerecord-5.0.0.1/lib/active_record/inheritance.rb:209:in `subclass_from_attributes'
/home/sog/.rvm/gems/[email protected]/gems/activerecord-5.0.0.1/lib/active_record/inheritance.rb:55:in `new'
/home/sog/.rvm/gems/[email protected]/gems/activerecord-5.0.0.1/lib/active_record/persistence.rb:33:in `create'
/home/sog/mds/mdslife_doctor/db/seeds.rb:107:in `block in <top (required)>'
/home/sog/mds/mdslife_doctor/db/seeds.rb:106:in `<top (required)>'
puts "schools data init."
School.delete_all
CSV.foreach("db/data/longer.csv") do |row|
School.create(name:row[0],department:row[1],address:row[2],level:row[3],remark:row[4],type:"全日制'")
end
puts "schools data finish."