Rails 4 + PostgreSQL hstore, can't execute "CREATE EXTENSION hstore" Rails 4 + PostgreSQL hstore, can't execute "CREATE EXTENSION hstore" postgresql postgresql

Rails 4 + PostgreSQL hstore, can't execute "CREATE EXTENSION hstore"


The solution is simple, just install postgresql-contrib in your OS and then run the migration as it is shown here Rails 4 PostgreSQL integration or any other way you using.For example if you are using ubuntu it will be:

sudo apt-get install postgresql-contrib-X.X

where X.X is the postgresql version that you are using. If it is version 9.3 it be:

sudo apt-get install postgresql-contrib-9.3

I also think for MAC Os is almost same, only that you will use brew.


This link helped me out. We need to install postgresql-contrib before trying to create a HStore extension.

https://gist.github.com/terryjray/3296171


OK, I just created a symlink, reinstalled gem pg, and now all works fine.