Migration failure PG::UndefinedObject: ERROR: type "json" does not exist

What version of PostgreSQL are you running?