From: Curt Hibbs Date: 2006-07-29T22:24:37+09:00 Subject: Re: How to solve Windows PATH in Ruby?? If you're going to use blackslashes in a literal string you need to double them because the backslash is an escape character. So, you really need to do this: p = Pathname.new("C:\\ruby\\samples\\myFile") Curt On 7/27/06, N Okia wrote: > I think this also depends on what ruby you are using. If you are using > One Click installer Ruby for Windows, then your code should work as > you have it. If you are using cygwin, then it probably won't work > correctly with the backslashes. > > Based on the path you are referring to: C:\ruby\, I assume you are > using One Click Ruby. However, in either event, forward slash should > work. > >