From: Austin Ziegler Date: 2004-04-29T20:35:00+09:00 Subject: Re: How to get homedir ? On Thu, 29 Apr 2004 19:14:03 +0900, gabriele renzi wrote: > il Thu, 29 Apr 2004 11:38:55 +0200, "Florent 'flure' C." > ha scritto:: >> I'm writing an app in ruby/glade and I want to save the configuration >> and some data in the directory of the user. >> There is the function g_get_home_dir() in the GLib, but I can't find >> the way to call it from ruby :( >> Also I need it to function on GNU/Linux, Windows, and hopefully MacOS X. > well, ENV['HOME'] works fine on my windows box and linux one If the Glade g_get_home_dir() call works on both Linux, Windows, and MacOS X, then you could use Ruby/DL to do that. ENV['HOME'] does NOT work on Windows, by default. This is something that was discussed not too long ago; I was having problems getting to www.ruby-talk.org yesterday, but I recommend searching for this on the list -- there is a Win32 API that you can call to get this information. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2004.04.29 * 07.32.12