PG::UndefinedTable: ERROR: relation "pg_range" does not exist

That’s very old.

You should be running 13.x nowadays.