Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on rails 4 logging issue

When I'm looking at the views rendered by ror framework, everything gets logged on the console, but when the ajax call is made to my server by some action user performed on the page, I don't get that part logged, I can't see the SQL executed in the console, and it's difficult to debug issues.

What can I do to turn on the logging for ajax requests as well?

like image 597
Gandalf StormCrow Avatar asked Oct 18 '22 20:10

Gandalf StormCrow


1 Answers

  1. Try hitting the AJAX endpoint directly from your browser, or better yet with curl.

    In either case check if the response, especially the headers and compare to another end endpoint, which is being logged correctly.

  2. Use something like pry to confirm you're actually hitting the code you think you're hitting.

  3. Check for spring. It's easy to get caught out hitting another process.

like image 77
davetapley Avatar answered Oct 21 '22 22:10

davetapley