Having just set up a staging environment last week, I may be able to help. :)
The dispatch.lsapi file I took from the lsapi gem directory, but here's the contents of it (note I've changed the location of ruby to match where it's installed on my server - you may have to change this)...