# Saving data from the output window to a text file

**URL:** <https://discuss.rubyonrails.org/t/saving-data-from-the-output-window-to-a-text-file/37216>\
**Category:** rubyonrails-talk\
**Created:** [December 10, 2008, 1:07pm UTC](https://discuss.rubyonrails.org/t/saving-data-from-the-output-window-to-a-text-file/37216 "2008-12-10T13:07:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phillon.morris](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@phillon.morris](https://discuss.rubyonrails.org/u/phillon.morris)\
**Post date:** [December 10, 2008, 1:07pm UTC](https://discuss.rubyonrails.org/t/saving-data-from-the-output-window-to-a-text-file/37216/1 "2008-12-10T13:07:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [December 10, 2008, 2:45pm UTC](https://discuss.rubyonrails.org/t/saving-data-from-the-output-window-to-a-text-file/37216/2 "2008-12-10T14:45:39Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![Iain\_Adams1](https://avatars.discourse-cdn.com/v4/letter/i/7bcc69/32.png) [@Iain\_Adams1](https://discuss.rubyonrails.org/u/Iain_Adams1)\
**Post date:** [December 10, 2008, 4:53pm UTC](https://discuss.rubyonrails.org/t/saving-data-from-the-output-window-to-a-text-file/37216/3 "2008-12-10T16:53:53Z")

</div>

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
