Le 10 janvier 2009 15:01, Glenn a ñÄrit : > f = File.new('myfile.rhtml', 'w') > rhtml = ERB.new(template) > rhtml.run(o.get_binding) > > I just can't figure out how to direct the result into the f > file object. Any suggestions? You have a 'result' method : File.open('myfile.rhtml, 'w') do |f| f.puts ERB.new(template).result(o.get_binding) end Note too that the block form of File is usually preferred, if only because the handles are automatically closed at the end of the block without the need of a call to close. Fred -- You give me the anger You give me the nerve Carry out my sentence Will I get what I deserve I'm just an effigy to be defaced To be disgraced Your need for me has been replaced And if I can't have everything Well then just give me a taste (Nine Inch Nails, Sin)