How about using the RUBY_PLATFORM constant?

def fu_windows?
      /mswin|mingw|bccwin|wince|emx|java/ =~ RUBY_PLATFORM
end

Found that little GEM here:
http://headius.blogspot.com/2006/03/ruby-in-rough.html



On Thu, Mar 27, 2008 at 9:09 PM, Assaf Arkin <[EMAIL PROTECTED]> wrote:
> Fixed in trunk now.
>  Do you have an idea how to check if an executable exists on Windows?  The
>  way we check for it right now will still show a, potentially confusing,
>  warning on the console.
>
>  Assaf
>
>  On Thu, Mar 27, 2008 at 12:02 PM, Shane Witbeck <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  > C:\projects\buildr>rake install
>  > (in C:/projects/buildr)
>  > Please run rake setup to install the Allison RDoc template
>  > Please run rake setup to install the Docter document generation library
>  > rake aborted!
>  > No such file or directory - prince --version
>  > c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2153:in
>  > `raw_load_rakefile'
>  > (See full trace by running task with --trace)
>  >
>  > C:\projects\buildr>rake setup
>  > (in C:/projects/buildr)
>  > Please run rake setup to install the Allison RDoc template
>  > Please run rake setup to install the Docter document generation library
>  > rake aborted!
>  > No such file or directory - prince --version
>  > c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2153:in
>  > `raw_load_rakefile'
>  > (See full trace by running task with --trace)
>  >
>  > C:\projects\buildr>
>  >
>  > --
>  > -Shane
>  >
>



-- 
-Shane

Reply via email to