Hi Jon,
I'm giving cloudkit a spin (using version 0.11.0) and I've come up
with a problem when using passenger (passenger-2.1.1 beta) to serve
the rack app. (i.e. the bug doesn't appear with mongrel)
I've tentatively tracked this down to Request#json and in particular
sending the #rewind message to the request body (i.e rack input).
For whatever reason, using mongrel the body was an instance of
Rack::Lint::InputWrapper. Using passenger, it was an instance of
TCPSocket which doesn't have a #rewind message.
My solution was to see how rails 2.3 handled this problem. Josh Peek
wrote a rewindable_input middleware which basically wraps rack input
in a StringIO to ensure it's rewindable. Using this middleware => no
more exception.
See code here:
http://gist.github.com/78368
I'm not sure where the actual fault lies (This could be a bug in
passenger) but perhaps you want to investigate further....
Regards,
Saimon