So, I was setting up my Chinese Chess site (domain name might not have propagated yet), and I had some problems. I kept getting the error ‘Application error: Rails application failed to start properly’. Looking in the logs the error was “Premature end of script headers: dispatch.cgi”. Tracked this down to the Dispatch.cgi file through Google, where other folks seem to have had problems with the EOF character.
I couldn’t figure out how to delete these characters – why is it that ‘vi’ is so popular? – so what I did in the end was create a new rails app and copy the cgi files across into my app. The files, although they appeared to have the same text, had very different file sizes.
Anyway, that seemed to do the trick.