# Issues with Restfulie using NGinx+Passenger+Ruby on Rails 2.3.8

**URL:** <https://www.ruby-forum.com/t/issues-with-restfulie-using-nginx-passenger-ruby-on-rails-2-3-8/193815>\
**Category:** NGINX\
**Created:** [August 24, 2010, 9:46pm UTC](https://www.ruby-forum.com/t/issues-with-restfulie-using-nginx-passenger-ruby-on-rails-2-3-8/193815 "2010-08-24T21:46:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![razenha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8c91f0/32.png) [@razenha](https://www.ruby-forum.com/u/razenha)\
**Post date:** [August 24, 2010, 9:46pm UTC](https://www.ruby-forum.com/t/issues-with-restfulie-using-nginx-passenger-ruby-on-rails-2-3-8/193815/1 "2010-08-24T21:46:03Z")

</div>

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
