connecting to postgres

1. What exceptions are in logs?

2. For legacy databases you might find useful class methods
set_primary_key, set_table_name, set_sequence_name, see
http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001013
and primary_key_prefix_type
http://dev.rubyonrails.org/browser/trunk/activerecord/lib/active_record/base.rb?rev=6139#L279

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.
http://www.postgresql.org/docs/current/static/sql-grant.html

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 :slight_smile:

But, you can dig postgres system tables (I mean with some ruby/sql
script) and build first scratch version of ActiveRecord models
automatically.

Hi,
for all those who may be wishing to integrate postgresql into their rails framework, I received this from the postgresql list: