move a file with fileutils
require 'fileutils' require 'tempfile' out = Tempfile.new("myhome_tempfile", "/home/leonardr/temp/") FileUtils.mv(out.path, "/home/leonardr/old_tempfile")