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