From: Robert Klemme Date: 2013-01-12T00:03:16+09:00 Subject: Re: How Ruby environment varibles work in realtime program? On Fri, Jan 11, 2013 at 3:54 PM, Joel Pearson wrote: > Oops, forgot the dollar signs. FYI that's a single line of code, it gets > put onto 2 lines by a line character limit on the forum. > > [$DLN_LIBRARY_PATH, $HOME, $LOGDIR, $RUBYOPT, $RUBYSHELL].each {|var| > puts var } > > When I run that in IRB they all come out as nil, presumably because in > that environment they aren't set. These are global variables and not environment variables! Please see Jeremy's reply for how to access environment variables. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/