So I have recently migrated to postgresql, and have been having issues with my test database creation. Whenever I run a rake task it seems to destroy my ability to access the test database that I have created. For example, if I run the following command
createdb -Ouser -Eutf8 example_test
I can run tests perfectly, however if I run a rake task I will get the following error:
.rvm/gems/ruby-1.9.2-p180@standard/gems/activerecord-3.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:991:in `initialize': FATAL: database "example_test" does not exist (PGError)
If I create a new test database like so:
createdb -Ouser -Eutf8 example2_test
Everything will work again, until I have to run a rake task. Does anyone know what this issue could be?