Joined September 2013
·

Hari Krishna

USA
·

You mean in config/routes.rb ? Yes, I already have it. Also as I mentioned earlier, it was rendering a JSON response when I was running with the Webrick server

render :json => {"nameslist" => nameslist}.to_json

Or are you saying nginx has a different routing mechanism other than the app's routes.rb ?

Thanks

Hi, I get a 404 error when I try hitting my server at http://localhost:3000/lookup_all/songs.json for data. Before when I used webrick, I used to get a json resposne with data from my Postgres DB but now I get this
2013/09/03 23:54:25 [error] 24750#0: *1 open() "/opt/nginx/html/lookupall/deities.json" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /lookupall/deities.json HTTP/1.1", host: "localhost:3000"

How can I configure nginx to return the app data ?

Achievements
1 Karma
0 Total ProTip Views