From: Kev Jackson Date: 2005-11-17T15:48:23+09:00 Subject: Determining the directory a script is running in How can I find the directory that the current script is running from? I need to run a script and (without any arguments), assign a variable based on the directory that the script is being executed from, ie c:\my_dir> ruby script.rb -> @dir = c:\my_dir or in unix /home/kj/ruby-projects/ruby script.rb -> @dir = /home/kj/ruby-projects/ I can't find what I'm looking for in the pickaxe, can anyone help out? Kev