I am trying to use a Rails 2.3.5 app with Postgres9.1 on Ubuntu (deployed on Apache2 with Phusion Passenger). The app throws this error when I try to access it, complaining that table does not exist:
PGError: ERROR: relation "users" does not exist
LINE 4: WHERE a.attrelid = '"users"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"users"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
However if I cut and paste the same query at the psql (cmdline-client), it works just fine.
The users table exists too. I tried a rake db:reset and 'rake db:migrate' again and again but it doesn't seem to help.
I also verified that the ActiveRecord::Base.connection succeeds from the script/console in the rails-appwhich means the connection to the database works with the credentials configured in database.yml.
I am lost.. any clues to remedy this will be appreciated greatly.