di quel che non c'è si fa senza

Wednesday, 12 March 2008

First, if you have the choice, ditch windows, not worth it. However, if you are like me and are forced to use windows for a project then your solution is a simple derivative of what you will find here.

I'm forced to work with a Windows server too and I was experimenting the same issue. Charlie put me on the right track and I solved it adding what follows at the beginning of #{RAILS_ROOT}/config/boot.rb:

As $stdout and $stderr are redirected only when IO#write raises an exception, it is effective only when Mongrel is running as a service and you still can launch it from a terminal or use a console without any problem.