First question as I start to learn programming!
I have created a script which outputs information on screen. I want to output this same information to a file; either a text file or csv file. I tried the following simple code which I found online (and nothing else):
File.write("C:\Users\ME\Documents\test\log.txt", "testing") and I tried adding the log.txt in that location thinking it would populate it with the word ‘testing’. It didn’t and I got the error message (which I think I have attached).
Is my approach completely wrong? I am running Ruby through another application (i.e. the application has a ruby interface which allows me to select and run .rb scripts).
Many thanks for reading.