Just a small tip for today: when moving an RoR-application between servers the database user often changes. While it is easy to dump and restore database dums using pg_dump and pg_restore this might lead to invalid table ownerships on the new host.
I’m using the following bash snippet for fixing this problem
(just exchange $DATABASE and $NEW_OWNER” with the corresponding database and username, execute the following bash script as postgres user):
If you tend to use this script more often encapsulate it in a quick-and-dirty bash script:
Author Andreas Happe
License CC BY-NC-ND 4.0