Question

I'm using Warbler to pack a Rails application into a WAR. I've deployed it to a JBoss server and it seems to works.

However, I'm getting the classic 500 error on Rails saying "We're sorry, but something went wrong.".

Usually, I'd take a look at logs/production.log to find out what's wrong, but since the project is WARed, I can't access it. The question is, where are the logs written when the Rails app gets warbled?

Was it helpful?

Solution

JRuby-Rack, the servlet container adapter that Warbler bundles, is set up by default to redirect Rails logs to the servlet container using the javax.servlet.ServletContext#log method. So exactly where the logs appear is server-specific. For Tomcat, they should be in catalina.out, for GlassFish, server.log.

If you still don't see error messages in the log files, there could be a bug somewhere along the way that is swallowing the error. Feel free to open a problem report for JRuby-Rack at http://kenai.com/jira/browse/JRUBY_RACK.

OTHER TIPS

Although this question is pretty old and has been answered already, but I had been facing similar issue with Sinatra application which was warbled and deployed in Tomcat. The catalina.out (or tomcat logs folder) was not spitting out the logs at all. I finally found that the logs reside in the deployed application's WEB-INF folder itself. For example

{TOMCAT_BASE}/webapps/{WEB_APPLICATION_PATH/WEB-INF/log/production.log

This had been a mystery to me for quite sometime.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top