I set up a Rails app on a remote server and created an hstore extension
sudo -u postgres psql
CREATE EXTENSION hstore;
I then deployed an iteration of the app that uses hstore in one of the postgres tables, but when it ran the migrations it gave an error message
PG::UndefinedObject: ERROR: type "hstore" does not exist
I then tried to do this again
sudo -u postgres psql
CREATE EXTENSION hstore;
but it told me hstore already exists
ERROR: extension "hstore" already exists
and this circle continued on.
Any idea what might be causing this problem? I'm using postgres 9.1 on an Ubuntu 12.04 server
Update Note, wondering if this issue was related to permissions, I tried to check my permissions like this but got the following error
sudo -u postgres psql -U username
psql: FATAL: Peer authentication failed for user "username"
Update Although hstore is installed, it's not an extension for the database I'm using. How to install it in a specific database?
psql -d db_production -c '\dx'
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)