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
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
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)?
I believe this is what you are after:
$ ruby -e ‘p Dir.pwd’
“/Users/james”
Hope that helps.
James Edward G. II
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs