I am a newbie to ruby and want to execute a ruby file that is provided
as input. I want to be able to redirect the output of the execution to a
log file as well.
I am basically looking at executing a test.rb file which could contain
print “hello world”
I tried kernel eval but will need to do this per line and also I am not
able to access sum in the print in 3rd line.
I also tried pipe open but then could not redirect the output to a file.
Any help in this regard would be very helpful.