No, it will not work because is can not be installed.
JRuby does not support native extensions or the `mkmf' library

As a part of the installation process Watir (as with many gems)
needs to  complile "native extensions". Neither JRuby (Ruby on Java)
nor  IronRuby (Ruby on .NET)  support that ability.

Thus until either JRuby or IronRuby  support that
need, or Watir is re-designed to install without the need
for that compilation step, you can't install it and thus it would run.

And since Java is platform independent (while Internet Explorer
is Windows only) So even if Watir could install on JRuby
it would still only work within JRuby on Windows.

However both commonwatir, and firewatir (1.9.x),
as well as watir-webdriver (0.3.2, 0.3.1) do not require the
compilation
of the native libraries, and thus do install.

Here's proof that they (and some other gems) can be installed in
JRuby:
----------

C:\Users\Joe\workspace>jruby -v
jruby 1.6.3 (ruby-1.8.7-p330) (2011-07-07 965162f) (Java HotSpot(TM)
64-Bit Server VM 1.6.0_26) [Windows Vista-amd64-java]

C:\Users\Joe\workspace>jgem list

*** LOCAL GEMS ***

bouncy-castle-java (1.5.0146.1)
builder (3.0.0)
childprocess (0.2.1)
choice (0.1.4)
commonwatir (1.9.2)
ffi (1.0.9 java)
firewatir (1.9.2)
google-spreadsheet-ruby (0.1.5)
hoe (2.12.0)
jruby-openssl (0.7.4)
jruby-win32ole (0.8.4)
json_pure (1.5.3)
log4r (1.1.9)
nokogiri (1.5.0 java)
oauth (0.4.5)
rake (0.8.7)
rautomation (0.6.3)
roo (1.9.6)
ruby-ole (1.2.11.1)
rubyzip (0.9.4)
s4t-utils (1.0.4)
selenium-webdriver (2.4.0)
sources (0.0.1)
spreadsheet (0.6.5.7)
todonotes (0.1.0)
user-choices (1.1.6.1)
watir-webdriver (0.3.2, 0.3.1)
xml-simple (1.1.0)

Here's output from a failed Watir installation in JRuby:
--------------

C:\Users\Joe\workspace>jgem install watir -v1.9.2
Building native extensions.  This could take a while...
ERROR:  Error installing watir:
        ERROR: Failed to build gem native extension.

        c:/JRuby/jruby-1.6.3/bin/jruby.exe extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf'
library very well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
checking for strncpy_s()... IOError: Cannot run program "cc" (in
directory "C:\JRuby\jruby-1.6.3\lib\ruby\gems\1.8\gems\win32-
api-1.4.8\ext"): CreateProcess error=2, The system cannot find the
file specified
         popen at org/jruby/RubyIO.java:3540
        xpopen at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:323
          open at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:260
        xpopen at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:316
     egrep_cpp at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:538
     have_func at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:758
  checking_for at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:652
      postpone at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:286
          open at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:260
      postpone at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:286
          open at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:260
      postpone at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:282
  checking_for at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:651
     have_func at c:/JRuby/jruby-1.6.3/lib/ruby/site_ruby/shared/
mkmf.rb:755
        (root) at extconf.rb:9
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=c:/JRuby/jruby-1.6.3/bin/jruby


Gem files will remain installed in c:/JRuby/jruby-1.6.3/lib/ruby/gems/
1.8/gems/win32-api-1.4.8 for inspection.
Results logged to c:/JRuby/jruby-1.6.3/lib/ruby/gems/1.8/gems/win32-
api-1.4.8/ext/gem_make.out
----------

I've had limited success with firewatir and watir-webdriver on JRuby,
but I'll stick to plain old Ruby, as I have no pressing need for
JRuby.

Sorry,
Joe


On Oct 6, 7:15 pm, wolfv <[email protected]> wrote:
> Will Watir 1.8.0 run on JRuby 1.5.0?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to