Watir - Installation

I installed Ruby 2, devkit and Watir. I get the following error. Can someone help me solve this problem?

C:\devkit>irb DL is deprecated, please use Fiddle irb(main):001:0> require "watir" => true irb(main):002:0> browser = Watir::Browser.new LoadError: cannot load such file -- watir-classic from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in`require' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-4.0.2/lib/watir/loader.rb:48:in `load_driver' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-4.0.2/lib/watir/loader.rb:40:in `load_driver_for' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/watir-4.0.2/lib/watir/loader.rb:8:in `new' from (irb):2 from C:/Ruby200/bin/irb:12:in `<main>' irb(main):003:0> 
+7
source share
2 answers

I am not sure what happened afterwards, but in case someone else runs into this problem, here is what I did to get it to work. Install watir-classic (as suggested), install ffi, uninstall ffi, install ffi again. For some reason, I had 2 ffi options (maybe due to the initial installation of Ruby 64 bit?), But I also uninstalled 64-bit Ruby and set 32 โ€‹โ€‹bit to make it work. - breezy katt February 26 at 13:47

0
source

I assume that you are talking about using Watir on a Windows computer. In my experience, installing Ruby correctly is the hardest part.

First of all, install everything as if you were on a 32-bit system. A 64-bit installation often causes unwanted problems.

However, the ffi stone can also cause problems, so you will have to remove it and reinstall it using specific tags:

 gem uninstall ffi gem install ffi --platform ruby 

Finally, the error showing LoadError: cannot load such file -- watir-classic simply means that what you are doing is trying to use a specific stone that is not there. In this case, watir-classic , so the following should fix the following:

 gem install watir-classic 

Complete Installation Guide for Watir on Windows

0
source

All Articles