From: Marnen Laibow-Koser Date: 2010-01-18T01:24:28+09:00 Subject: Re: Which source file? Ralph Shnelvar wrote: > >>>>> Windows development environment. >>>> >>>> How is that relevant? >>> >>> I don't know! How files are handled might be different on different >>> development platforms. >> >> I suppose. But in this case, no. So far as I know, there's no >> significant difference in Ruby source code handling between OSes, except >> perhaps for case-sensitivity issues. (That said, I don't use Windows, >> so it's conceivably that I'm not aware of something.) > > Ruby (Rails?) does so much that is different depending on case. > > Windows stores file names with case sensitivity but accesses the files > without regard to filename case. Right. The filesystem is case-preserving but not case-sensitive. > > Thus the Filenames "SomeFile" and "Somefile" are different strings, they > refer to the same underlying file in Windows. > > But if Rails cares about filename case sensitivity ... Rails' autoloading routines expect snake-case filenames, so MyModel will be loaded from my_model.rb. Now, on Windows, if there's a file My_Model.rb, then the filesystem will return that when my_model.rb is requested, whereas most *nix filesystems will not. But that's up to the filesystem. AFAIK Ruby simply requests a particular file, and doesn't know anything about how the filesystem will satisfy that request. > > So ... does Rails care about case sensitivity in filenames? Sort of, as outlined above. I have found it to be best to always act as if the filesystem is case-sensitive, even if it isn't. Best, --  Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.