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

**URL:** <https://www.ruby-forum.com/t/locomotive-question-how-can-i-see-standard-out-for-ruby-app/85524>\
**Category:** Rails\
**Created:** [February 14, 2007, 8:25am UTC](https://www.ruby-forum.com/t/locomotive-question-how-can-i-see-standard-out-for-ruby-app/85524 "2007-02-14T08:25:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 14, 2007, 8:25am UTC](https://www.ruby-forum.com/t/locomotive-question-how-can-i-see-standard-out-for-ruby-app/85524/1 "2007-02-14T08:25:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 14, 2007, 8:32am UTC](https://www.ruby-forum.com/t/locomotive-question-how-can-i-see-standard-out-for-ruby-app/85524/2 "2007-02-14T08:32:47Z")

</div>

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](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](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 14, 2007, 11:33am UTC](https://www.ruby-forum.com/t/locomotive-question-how-can-i-see-standard-out-for-ruby-app/85524/3 "2007-02-14T11:33:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 14, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/locomotive-question-how-can-i-see-standard-out-for-ruby-app/85524/4 "2007-02-14T20:54:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 14, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/locomotive-question-how-can-i-see-standard-out-for-ruby-app/85524/5 "2007-02-14T17:57:59Z")

</div>

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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](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](http://Nabble.com).
