I want to write a application that works in windows and linux. but I have a path problem because windows use \"\\\" and Linux use \"/\" .how can I solve this problem. thanks
Use the Pathname
class to generate paths which then will be correct on your system:
a_path = Pathname.new("a_path_goes_here")
The benefit of this is that it will allow you to chain directories by using the +
operator:
a_path + "another_path" + "and another"
Calling a_path.to_s
will then generate the correct path for the system that you are on.