How to view error messages from ruby CGI app on remote server?
I have written a Ruby (not Rails) app which generates web pages. The script is installed on a linux web server and is called up by apache using CGI in response to HTTP requests. Pretty standard stuff.
When I am running it on my own computer I look at the apache error log to see the ruby error messages.
However, on the host that I use I have no access to the apache error_log. Therefore I am presently unable to see the error messages wh开发者_如何转开发en my script hits a problem. Usually just a blank page or an apache error page.
I have ssh access to the host.
Is there a way to easily see the error messages and other log output?
Multiple solutions here.
Redirect logs to syslog (assuming you have access to it). Read more here
Analyze Rails application logs (don't be confused by http logs in Apache) in your_app_dir/logs
精彩评论