On JRuby, browser's binary detection according to platform does'nt work.
Here is a patch to lib/firewatir/firefox.rb to support JRuby on any platform :
— gems/firewatir-1.6.2/lib/firewatir/firefox.rb 2009-02-05 12:26:00.000000000 +0100
+++ gems/firewatir-1.6.2/lib/firewatir/firefox.rb 2009-02-05 14:33:42.000000000 +0100
@@ -133,8 +133,12 @@
waitTime = options[:waitTime] || 2
- case RUBY_PLATFORM
- when /mswin/
+ platform = RUBY_PLATFORM
+ if platform.start_with?("java")
+ platform = java.lang.System.getProperty("os.name")
+ end
+ case platform
+ when /mswin|windows/i
- Get the path to Firefox.exe using Registry.
require 'win32/registry.rb'
path_to_bin = ""
@@ -150,10 +154,8 @@
when /linux/i
path_to_bin = `which firefox`.strip
Patch file attached