When using hstore in Postgresql 9.2 in a Rails 3.2 app, I got an error complaining as follows when raking my test database:
PG::Error: ERROR: type "hstore" does not exist
Since it built from schema, the test database didn't go through the hstore CREATE EXTENSION migration that the development database. This caused the error on the rake db:test:prepare.
How to fix this? I've actually discovered a fix, happy to hear more.
I simply enabled my postgresql database to support hstore by default (by having the template database support hstore). Run the following command to do so:
psql -d template0 -c 'create extension hstore;'
Then any Rails test db will automatically support the extension.