Ran into this funny little bug and didn't find too much about it on the interwebs, so for prosperities' sake here are the gory details...
The error is "RuntimeError: PhusionPassenger::Utils::RewindableInput is not a valid input stream. It must walk like either a String, an IO, or a Source."
The offending line of code occures when using REXML to parse an XML document as part of a webhook controller:
doc = REXML::Document.new request.body()
Under the covers, it is this line of code that generates the error:
This is a rails 3 app, running under Phusion Passenger 3.0.10 and REE 1.8.7.
The solution, courtesy of jsierles, is to fixup Passenger with an ImprovedRewindableInput: https://gist.github.com/281126 Basically, create a /config/initializers/phusion-rexml-phixup.rb file and paste the code from that gist.