Ruby Open Arquivo e Anexar

File.open("foo.txt", "a") { |f| f << "foo" }
MunnaBhaiyya