On Sunday 12 June 2005 11:29 am, carlos tirado wrote: > When I tried this, I found that the gem installer uses some other > win98 incompatible commands. I believe it was: > <ruby_home>/lib/ruby/site_ruby/1.8/rubygems.rb on > def find_home, line 326 > return "#{ENV['HOMEDRIVE']}:#{ENV['HOMEPATH']}" > and a couple of lines below > File.expand_path("~") We do try to make an attempt to "do what's right" on whatever platform we are running on. We only return the HOMEDRIVE/HOMEPATH string if both HOMEDRIVE and HOMEPATH exist. Here's the current find_home strategy: * Use ENV['HOME'] if it exists. * Use ENV['USERPROFILE'] if it exists. * Use "#{ENV['HOMEDRIVE']}:#{ENV['HOMEPATH']}" if both exist. * Try to expand ~ * If the expansion works, use that. * If the expansion failed, catch the error and return "C:/" on windows and "/" on non-windows. Any suggestions on improving this to work better for win98 would be appreciated. -- -- Jim Weirich jim / weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)