From: Logan Capaldo Date: 2006-03-09T06:44:43+09:00 Subject: Re: idioms for separating out OS-specific stuff --Apple-Mail-30-338307837 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Mar 8, 2006, at 4:18 PM, Joe Van Dyk wrote: > And then probe (somwhow?) to figure out what OS I'm running on and > then including the correct modules into my code. As far as probing goes... irb(main):026:0> Config::CONFIG['host_os'] => "darwin8.4.0" irb(main):027:0> Config::CONFIG['arch'] => "powerpc-darwin8.4.0" etc. You can also try shelling out and calling uname, but that of course won't work on windows for example. logan:/Users/logan% uname -s Darwin logan:/Users/logan% uname -r 8.5.0 logan:/Users/logan% uname -v Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC logan:/Users/logan% uname -a Darwin logan-capaldos.poly.edu 8.5.0 Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC Power Macintosh powerpc --Apple-Mail-30-338307837--