psql --version
psql (PostgreSQL) 9.4.1
rails -v
Rails 4.2.0
I added a jsonb column through migration like that
class AddPreferencesToUsers < ActiveRecord::Migration
def change
add_column :users, :preferences, :jsonb, null: false, default: '{}'
add_index :users, :preferences, using: :gin
end
end
I get this error :
PG::UndefinedObject: ERROR: type "jsonb" does not exist
LINE 1: SELECT 'jsonb'::regtype::oid
any help ?