Locomotive Question: How can I see standard out for ruby app

Hi,

Can someone tell me with Locomotive how to see standard out for ruby
applications that I run up???

e.g. if there’s been a problem starting up a Ruby project/application
using
Locomotive and I want to see the standard out during startup to see what
was
happening?

Tks
Greg

Locomotive runs (IIRC) Rails apps under Lighty, so they’re all in fcgi
processes. These fcgi’s don’t have a terminal attached so you’re pretty
much
out of luck.

I user logger.error to record the information. If you want to run under
WEBrick, you can puts to STDERR. I still recommend using the logger, as
it
works across servers. The STDERR trick may work in Mongrel attached, but
not
if it’s detached (untested).

–steve

Greg H.-3 wrote:

happening?

Tks
Greg


View this message in context:
http://www.nabble.com/Locomotive-Question%3A-How-can-I-see-standard-out-for-ruby-applications-that-it-starts-up----tf3225622.html#a8959986
Sent from the RubyOnRails Users mailing list archive at Nabble.com.

tks Steve,

Locomative is running mongrel in my setup:

greg$ ps -ax | grep ruby
252 ?? S 0:02.10 ruby
/Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/i386/bin/mongrel_rails
start
253 ?? S 0:02.30 ruby
/Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/i386/bin/mongrel_rails
start

When you say “you can puts to STDERR”, what did you mean by this? Is
there
a way to tell Mongrel or WEBrick to send “standard out” to standard
error?
(sorry my unix skills aren’t that hot)

Cheers
Greg

I’m interested in seeing the Mongrel output (i.e. I know I can put my
own
logger.debug statements in myself)…

…actually I’ve just been looking at the mongrel.log file that is
created. By tailing this file it seems to give the same detail as
standard
out which is what I was after…my misunderstanding of how mongrel
behaves…thats for putting me on the right track

Greg

Try STDERR.puts(‘whatever you like here’) that way you get both streams.
However, I still think a detached Mongrel will discard any
console-related
output.

Why does the logger not work for you?

–steve

Greg H.-3 wrote:

/Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/i386/bin/mongrel_rails
On 2/14/07, s.ross [email protected] wrote:

it

Tks


View this message in context:
http://www.nabble.com/Locomotive-Question%3A-How-can-I-see-standard-out-for-ruby-applications-that-it-starts-up----tf3225622.html#a8968880
Sent from the RubyOnRails Users mailing list archive at Nabble.com.