Error resolved when rake db:migrate.