From: Roger Pack Date: 2009-02-01T06:49:26+09:00 Subject: [ruby-core:21703] Re: File.dirname(__FILE__) errs after Dir.chdir > as described in > http://www.ruby-forum.com/topic/177230#new Looks like the real problem is not that __FILE__ doesn't resolve to a full path--that's more of a solution. The real discrepancy that bit me was, with the following tree: ./in_root.rb: Dir.chdir 'subdir' require 'in_subdir' subdir/ in_subdir.rb: puts File.join(File.dirname(__FILE__), 'config', 'boot') on windows: C:\dev\test>ruby in_root.rb ./config/boot on linux: $ ruby in_root.rb /home/rdp/dev/test/subdir/config/boot Which tripped me up. Is this difference expected? Thanks! -=r