discovering the OS

D

dc

hi list -

just wondering if there is a way to find out which OS ruby is running on?

for these type of:

if (windows)
system "start file.html"
else if (mac)
system "open file.html"
end



--
 
A

ara.t.howard

hi list -

just wondering if there is a way to find out which OS ruby is running on?

for these type of:

if (windows)
system "start file.html"
else if (mac)
system "open file.html"
end

try this

ruby -r rbconfig -r yaml -e' y Config::CONFIG '

-a
 
D

David Roberts

dc said:
hi list -

just wondering if there is a way to find out which OS ruby is running
on?

for these type of:

if (windows)
system "start file.html"
else if (mac)
system "open file.html"
end



--
-------------------------------------------
David "DC" Collier
mailto:[email protected]
+81 (0)80 6521 9559
skype: callto://d3ntaku


RUBY_PLATFORM?

RUBY_PLATFORM
The identifier of the platform running this program. This string
is in the same form as the platform identifier used by the GNU
configure utility (which is not a coincidence).

David
 
W

William Crawford

David said:
RUBY_PLATFORM
The identifier of the platform running this program. This string
is in the same form as the platform identifier used by the GNU
configure utility (which is not a coincidence).

Spoilsport. Why's Ruby always gotta make things easy? -sigh-

Truly, that's the hardest thing for me to get used to... I'm used to
having to work to find out things like that.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top