hai guys
can any body guide me how to get the linux home path using ruby
langauage.
thanks in advance
bye
Keadr
···
--
Posted via http://www.ruby-forum.com/.
hai guys
can any body guide me how to get the linux home path using ruby
langauage.
thanks in advance
bye
Keadr
--
Posted via http://www.ruby-forum.com/.
The HOME environment variable should be set:
ENV['HOME']
On Thu, 19 Apr 2007 19:14:16 +0900, Kjedar Sip wrote:
can any body guide me how to get the linux home path using ruby
langauage.
Kjedar Sip wrote:
hai guys
can any body guide me how to get the linux home path using ruby
langauage.thanks in advance
bye
Keadr
ENV['HOME']
Kjedar Sip wrote:
hai guys
can any body guide me how to get the linux home path using ruby
langauage.
irb(main):010:0> ENV["HOME"]
=> "/home/cynicalryan"
This should work for Windows, too, not just *nix.
--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan.110mb.com/
http://clothred.rubyforge.org
Rule of Open-Source Programming #33:
Don't waste time on writing test cases and test scripts - your users are
your best testers.
homepath = Pathname.new(ENV['HOME'])
Would be my guess.