Rails on Apache: Malformed Header from Script

So, you’ve just pushed your site onto your production server and you’re getting something like the below:

[error] [client xxx.yyy.zzz.xxx] malformed header from script. Bad header=[“a”]: dispatch.fcgi

It’s likely you’re code is trying to write out something before it delivers a webpage. Check your code for `puts` statements. This includes your helper methods, which is what caught me out!

Orginally sourced from [noizZze](http://blog.noizeramp.com/2007/07/29/rails-malformed-header-from-script/).