Have you looked at Ruby's ENV environment hash? Try:

  p ENV

to see what's available on your OS.
-- 
Posted via http://www.ruby-forum.com/.