Newbie ruby question (finding OS)

Discussion in 'Ruby' started by Paul Johnston, Jan 18, 2006.

  1. Hi
    Just started looking at ruby and have a question
    Is there a simple way to get an idea of what operating system a ruby
    program is running on.
    I was guessing checking the OS's file system using something like
    "executable?" or even "system" and running a specific *nix command
    and seeing what happens but these seem rather crude.
    Any suggestions ?
    TIA
    Paul
    Paul Johnston, Jan 18, 2006
    #1
    1. Advertising

  2. Paul Johnston

    Dave Burt Guest

    Paul Johnston wrote:
    > Is there a simple way to get an idea of what operating system a ruby
    > program is running on.


    Use the RUBY_PLATFORM constant.

    Cheers,
    Dave
    Dave Burt, Jan 18, 2006
    #2
    1. Advertising

  3. On Wed, 18 Jan 2006 09:20:04 GMT, "Dave Burt" <> wrote:

    >Paul Johnston wrote:
    >> Is there a simple way to get an idea of what operating system a ruby
    >> program is running on.

    >
    >Use the RUBY_PLATFORM constant.
    >
    >Cheers,
    >Dave
    >


    Many thanks
    Paul
    Paul Johnston, Jan 18, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. p
    Replies:
    3
    Views:
    351
    Andrew Thompson
    Jul 14, 2004
  2. Benz
    Replies:
    3
    Views:
    478
    Mark Murphy
    Feb 3, 2005
  3. john
    Replies:
    41
    Views:
    1,205
    Chris Theis
    Jan 22, 2004
  4. steveH
    Replies:
    3
    Views:
    151
    steveH
    Sep 5, 2005
  5. Jerry C.
    Replies:
    8
    Views:
    227
    Uri Guttman
    Nov 23, 2003
Loading...

Share This Page