D
Dale Ackerman
How do I test in my scripts for the OS type? So I can conditionally run
different code..?
thanks
different code..?
thanks
How do I test in my scripts for the OS type? So I can conditionally run
different code..?
How do I test in my scripts for the OS type? So I can conditionally run
different code..?
Jacob said:A quick google search led to this:
http://snippets.dzone.com/posts/show/6238 I imagine using RUBY_PLATFORM
in
some manner is a good solution.
38=A0I imagine using RUBY_PLATFORM inA quick google search led to this:http://snippets.dzone.com/posts/show/62=some manner is a good solution.
No, do not use RUBY_PLATFORM. JRuby will return "java", for example:
If you want something built in use rbconfig.rb. Specifically,
Config::CONFIG['host_os']. Or you can use a 3rd party gem like sys-
uname or os.
Regards,
Dan
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.