We have a tutorial about migrating a Wordpress sites from another VPS, that should be largely similar for DreamHost:
As for migrating your rails app from Heroku, you might be interested in using our Dokku app:
This tutorial covers how to migrate your data and website off of a different VPS provider to DigitalOcean. The basic procedures are the same regardless of where you are migrating from. We discuss some strategies for maintaining data integrity and creating a similar operating environment on a new VPS instance.