You have to do it that way, but you don't need to asign it to the items variable.
You just have to add to the seed.rb file the code with your items. I've added the delete_all before to avoid creating duplicate items.
Item.delete_all
Item.create([
{ name: 'css' },
{ name: 'css3' },
{ name: 'ruby' },
{ name: 'rails' },
{ name: 'python' },
{ name: 'html' }
])
And then you'll have to seed your database with rake:db seed.