Sorry for my english. I have to create twitter like app. I created 3 models User, Tweet, Followership class User < ActiveRecord::Base has_many :tweets accepts_nested_attributes_for :tweets has_many :followerships, class_name: 'Followership', foreign_key: 'followed_id' has_many :followerships, class_name: 'Followership', foreign_key: 'follower_id' has_many :followed, through: :followedships, source: :followed has_many :followers, through: :followerships, source: :follower end class Tweet < ActiveRecord::Base belongs_to :user end class Followership < ActiveRecord::Base belongs_to :follower, class_name: 'User' belongs_to :followed, class_name: 'User' end I have *yaml* file with *UTF-8* data to add to my db. I changed my *seeds.rb* file in such a way: seed_file = File.join(Rails.root, 'db', 'seeds.yml') config = YAML::load_file(seed_file) User.create(config["users"]) Followership.create(config["followerships"]) Then i tried to run *rake db:seed* and got alexkd@Active-pc:~/WebDev/rails/twitter$ rake db:seed rake aborted! ActiveRecord::AssociationTypeMismatch: Tweet(#97039630) expected, got Hash(#81744670) ... Whats the problem? I have no ideas. *ruby 2.0, Rails 4.1.0, sQlite3* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7721737d-c601-46e4-a0f1-314a63f212be%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.