I’m having a hard time getting tempfile to work correctly for me. I
have a couple of questions
Isn’t it possible to open a tempfile, write to it, close it then later
open it again write to it and close it?
I don’t seem to be able to do that. Every time I write to the file it
only or over writes what is in the file.
temp = Tempfile.new(“stuff”)
name = temp.path
temp.puts “I was here”
here I’d like to reopen the file and write another line
str = temp.gets # I was here
What am I doing wrong?
Any help is good, thank you.