Debugging AJAX requests with better_errors
is an awesome gem for enhanced error pages in development, featuring a live-REPL for some light debugging.
To debug the exception you got on an AJAX-Request, visit
/__better_errors on your app's root path (e.g.
http://localhost:3000/__better_errors). It shows the error page for the last exception that occurred, even when it has been triggered by an AJAX request.