I work on Ubuntu developing a Rails app for my church. We use a hosted VPS also on Ubuntu. I use Capistrano to deploy periodic updates. Inevitably, however, an app that works on my local box, always has a handful of problems after deploying to the host, most likely because the environments differ.
What are some practices/techniques to ease deployment so that what is tested and works locally is just as likely to work on the host. (I have already adopted the "vendor everything" approach.)
My first thought is to develop/work within a local VPS image that itself will eventually be deployed (a virtual appliance of sorts). Is anyone doing this?
What do others do to minimize issues that result from environmental differences? What hosts provide the best deployment options?