Error in running a simple watir script: uninitialized constant Watir::IE (NameError)

64-bit, ruby, watir, watir-webdriver, windows-7

Solution

Based on the error, my guess is that watir-classic is failing to install the nokogiri gem. Nokogiri does not currently support Ruby x64 on Windows - see https://github.com/sparklemotion/nokogiri/issues/864.

Two things you could try:

Use 32bit Ruby (as suggested in the Nokogiri issue)

Use a browser other than IE. By default, `Browser.new` will start IE using watir-classic. Using one of the other browsers will use watir-webdriver, which I do not believe is dependent on nokogiri.

Example:

require 'watir'
browser = Watir::Browser.new :chrome
browser.goto("http://www.google.com")

Problem

I have installed Ruby 2, devkit & Watir. - enviroment: OS win7(64bit) - installation files: - rubyinstaller-2.0.0-p0-x64.exe - DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe - part of gem list result: - commmonwatir 4.0.0 - watir 4.0.0 - win32-process 0.6.6 when I running a simple script: ``` require 'rubygems' require 'watir' require 'watir-webdriver' ie = Watir::IE.new ie.goto("http://www.google.com") ``` I am getting the following error: ``` uninitialized constant Watir::IE (NameError) ``` then I tried `ie = Watir::Browser.new` instead of `ie = Watir::IE.new` still getting error: ``` cannot load such file watir-classic (loaderror) ``` then I tried installing watir-classic, getting error again: ``` extconf.rb libxml2 is missing ``` Can anyone please help me resolve this issue?

Original source