tags:

views:

90

answers:

2

I need to read the data out of database and then save it in a text file, how can I do that in Ruby? Is there any file management system in Ruby?

Thanks

+2  A: 

Are you looking for the following:

File.open(yourfile, 'w') {|file| file.write("your text") }

Todd R
+2  A: 

This is a Ruby question, that is very well documented.

http://ruby-doc.org/core/classes/File.html

jdl