So, the problem shows out clear: you connect to database with postgres
role that does not have enough privilieges.
Make sure you did GRANT'ed necessary access to database objects.
Well, using legacy database schema that does not conform to Rails
conventions and cannot be changed, is indeed not very DRY.
e.g. when defining associations one may need to declare foreign key
names and class names explicitly, but from my own experience it's not
that bad even with dozens of tables
But, you can dig postgres system tables (I mean with some ruby/sql
script) and build first scratch version of ActiveRecord models
automatically.