# Re: Full paths of Ruby interpreter and running script

**URL:** <https://www.ruby-forum.com/t/re-full-paths-of-ruby-interpreter-and-running-script/58048>\
**Category:** Ruby\
**Created:** [April 17, 2006, 11:54pm UTC](https://www.ruby-forum.com/t/re-full-paths-of-ruby-interpreter-and-running-script/58048 "2006-04-17T23:54:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_SBillS\_Froe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@William\_SBillS\_Froe](https://www.ruby-forum.com/u/William_SBillS_Froe)\
**Post date:** [April 17, 2006, 11:54pm UTC](https://www.ruby-forum.com/t/re-full-paths-of-ruby-interpreter-and-running-script/58048/1 "2006-04-17T23:54:29Z")

</div>

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
