how to replace from "\" to "/"

There’s always File.join, which puts in the appropriate slashes where necessary. Otherwise, gsub:

path_string.gsub(/\/, “/”)

Jason