This is step by step procedure that I use to deploy a rails application on an Ubuntu VPS.  Depending on the gems and versions, it may vary.