On 1/14/2010 4:12 PM, IƱaki Baz Castillo wrote:
> Hi, is there a reliable way under Ruby to know the OS architecture (32 or 64
> bits)?
>
> I've just found RUBY_PLATFORM constant which returns "x86_64-linux" under 64
> bits, however it doesn't send very reliable for me.
>
> I need a way working under Linux and BSD. Thanks for any suggestion.
>
>    

I can't vouch for how accurate it is, but an OS gem was recently 
announced on this list.
gem install os

irb(main):001:0> require 'os'
=> true
irb(main):002:0> OS.bits
=> 64
irb(main):004:0> OS.posix?
=> true
irb(main):005:0>