run this
rake db:migrate
then this
rake db:test:prepare
Alternative variant
RAILS_ENV=test rake db:migrate