Re: Full paths of Ruby interpreter and running script


#1

Well the full path to the running script is easy enough to get from
within Ruby and based on your needs might suffice for finding the
configuration file at runtime.

puts File.expand_path(FILE) # c:/rubytest/test.rb

If you want just the directory then use this

puts File.dirname(File.expand_path(FILE)) # c:/rubytest

Hope this helps!

–Bill