On Rails 4.0.0.rc1, Ruby 2.0.0, after I run a migration, I see the following error when I try to run a test through rspec:
rspec
/Users/peeja/.
You can try to set variable BEFORE command, like this. This statement solved my problem:
RAILS_ENV=test rake db:migrate