Can't speak for rails, but for Django we're talking 15 lines and a pair of commands for a clean setup:
* Create a virtualenv with all your dependencies and your django application checked out (0 lines)
* Extract static files to whatever directory you're serving static files from (1 command in 1.3)
* Create your wsgi handler script (4 lines, because you have to setup the DJANGO_SETTINGS_MODULE env)
* WSGIScriptAlias and the relevant directory allow (5 lines)
* WSGIDaemonProcess and WSGIProcessGroup configuration directives (2 lines)
done.