Thanks James, that's exactly what I need.

Sonny.

James Gray wrote:
> On Feb 13, 2007, at 2:07 PM, Sonny Chee wrote:
> 
>> Hey Guys,
>>
>> Anyone know how I can determine the name of the host operating system
>> from within Ruby?
> 
> Sure:
> 
>  >> RUBY_PLATFORM
> => "i686-darwin8.8.1"
>  >> require "rbconfig"
> => false
>  >> Config::CONFIG["target"]
> => "i686-apple-darwin8.8.1"
>  >> Config::CONFIG["arch"]
> => "i686-darwin8.8.1"
>  >> Config::CONFIG["target_os"]
> => "darwin8.8.1"
> 
> Hope that helps.
> 
> James Edward Gray II


-- 
Posted via http://www.ruby-forum.com/.