Rawr on Windows is Broken
When I try to use rawr on Windows, I get this:
=== Creating jar file: C:/Users/Alex/Documents/Projects/hello_world/package/jar/ChangeMe.jar
rake aborted!
stat.st_gid unsupported on this platform
It looks like the version of rubyzip bundled with rawr has a malfunctioning test for Windows:
RUNNING_ON_WINDOWS = /mswin32|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
That’s bound to fail on jruby:
C:\Users\Alex\Documents\Projects\hello_world>jirb
irb(main):001:0> RUBY_PLATFORM
=> "java"
I’m not sure what the “official” fix for this is; I’ll post an update once I’ve figured it out.
Update: I don’t know if it’s in any way proper, but editing the above test in %JRUBY_HOME%/lib/ruby/gems/1.8/gems/rawr-1.1.0/lib/zip/zip.rb to read:
RUNNING_ON_WINDOWS = (/mswin32|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM) ||
(/Windows/ =~ ENV['OS'])
seems to allow the jar file to be built, and the executable file to be generated, but it doesn’t actually run. Hm. More work needed here.
Further Update: There’s a better fix in rawr’s gitorious repository for this now using rbconfig. I’m still working (with Logan Barnett’s sterling help) on getting it working.