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.
psql -d template1 -c 'create extension hstore;'
did the trick (Postgres 9.1). According to a post on PostgreSQL.org, "Template0 is the 'blank' pgsql database template that contains just those things that come out-of-the-box." – Whitson