It seems that the build has been broken for some time (travis says that the last successful build was 4 days ago: Travis CI - Test and Deploy Your Code with Confidence).
However I found that the 2nd, 3rd, etc test run succeeds. Could someone more knowledgeable please look into the problem? The steps to reproduce are simple:
bundle install bundle exec rake db:drop bundle exec rake db:create bundle exec rake db:migrate bundle exec rake db:test:prepare bundle exec rake spec # <-- this fails bundle exec rake spec # <-- this and all following ones succeed