Forum: Ruby on Rails Saving data from the output window to a text file

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2851ee1b6857f64cdc3f37f984b256f5?d=identicon&s=25 phillon.morris@googlemail.com (Guest)
on 2008-12-10 15:45
(Received via mailing list)
Hi group,

I'm a complete novice who is having lots of fun discovering Ruby, Ruby
on Rails / Watir.  Good bits of software.

I wanted to record the info in the output window, into a text file.  I
wanted to do this in Ruby as I don't know enough about R-o-R.

Can anyone help me out on this.

Thanks in advance
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-12-10 15:46
(Received via mailing list)
On Dec 10, 1:07 pm, "phillon.mor...@googlemail.com"
<phillon.mor...@googlemail.com> wrote:
> Hi group,
>
> I'm a complete novice who is having lots of fun discovering Ruby, Ruby
> on Rails / Watir.  Good bits of software.
>
> I wanted to record the info in the output window, into a text file.  I
> wanted to do this in Ruby as I don't know enough about R-o-R.
>

as in the output you get when you run script/server ? It's already
being saved to log/development.log (or log/production.log when in the
production environment etc...)

Fred
9f9c3cd0120e224edb912be6e706f125?d=identicon&s=25 Iain Adams (Guest)
on 2008-12-10 17:54
(Received via mailing list)
Also, if you want whatever you spit out using puts

i.e puts array.inspect

then you can save to a text file by running mongrel in deamon mode

mongrel_rails start -d

This will save all output in log/mongrel.log

On Dec 10, 1:07 pm, "phillon.mor...@googlemail.com"
This topic is locked and can not be replied to.