View Full Version : Saving and loading variables to/from a file in ruby

July 25th, 2008, 09:54 AM
I have a couple of variables i want to save to a file, then next time the program runs, i would like these variables to be loaded from the file again.

The first time the program runs, the file the variables are saved to will not exist, it will need to be created.

What's the best way to go about this in ruby? I am VERY new to ruby, I only started using it yesterday.

Thanks very much for your help!