How to find the current path?

Hello,

I am fairly new to ruby and wonder if there is a class/method that returns
the absolute path of the current directory (the directory I execute the ruby
script from)?

Thanks,
--Bernd

I believe this is what you are after:

$ ruby -e 'p Dir.pwd'
"/Users/james"

Hope that helps.

James Edward Gray II

ยทยทยท

On Feb 10, 2006, at 11:48 AM, Paatsch, Bernd wrote:

Hello,

I am fairly new to ruby and wonder if there is a class/method that returns
the absolute path of the current directory (the directory I execute the ruby
script from)?