A really wacky error! I am running Phusion Passenger on Mac OS X, and I was getting a:
500 Internal Server Error
When I was trying to do a POST that went over a certain size limit, about 5960 bytes or so.
It turns out that the web server was trying to write into the directory:
/tmp/passenger.15068/webserver_private
But that directory didn't exist. I created it and all was well.