Hi,
I have an application using a gem named Restfulie for json ajax request.
I`m
using the good and old webrick in my local dev environment and the
applicatiom works just fine.
Restfulie uses content negotiation, the response content-type is based
on
the “accept” http header. For example, if my request http header
“accept” is
“application/json”, the response with be a json document, if it is
“text/html”, the response will be a html page, based on a erb template.
As I said, the app works fine in Webrick, but when I deploy to the
production env, which is Ubuntu 10.04+Nginx+Passenger, it fails. The
application fails to determine that the request is a json request and
tries
to return an HTML, even with the contentType and accept as
“application/json”.
It looks like a passenger ou nginx problem, but I`m not sure. It looks
like
one of them is not passing the “accept” header to the application. Did
anyone had problems like this one? Did anyone use Restfulie with
Nginx+Passanger?
Regards,
– Rubem