4

Watir's site says I need Ruby 1.8.6, which I'm running. And windows installation should be as simple as gem install watir. But when I run that, I get this:

C:\Users\Ryguy\Code>gem install watir
Building native extensions.  This could take a while...
ERROR:  Error installing watir:
        ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb
checking for strncpy_s()... no
creating Makefile

make
'make' is not recognized as an internal or external command,
operable program or batch file.


Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5 f
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/win32-api-1.4.5/ext/gem_make.out

My Ruby Version: ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
My RubyGems Version: 1.3.5

Željko Filipin
  • 56,372
  • 28
  • 94
  • 125
RyanScottLewis
  • 13,396
  • 16
  • 56
  • 84

5 Answers5

3

I would recommend you install the RubyInstaller Development Kit as documented here

Once you've installed it, the compile process of Watir dependencies (win32-api) will install successfully.

Luis Lavena
  • 10,348
  • 1
  • 37
  • 39
0

Turns out I needed to install the Ruby Development files. =/

RyanScottLewis
  • 13,396
  • 16
  • 56
  • 84
  • 1
    Just a thought...Our company started out in Windows and quickly found that it'd be easier to use Cygwin (a linux 'emulator'), then we switched to virtualized Ubuntu because it was a bit of a pain to try and run Ruby on Windows. Good Luck though! – btelles Dec 22 '09 at 21:13
0

Execute Below command and its works

gem install watir --platform=mswin32

AMIC MING
  • 6,306
  • 6
  • 46
  • 62
0

Installed devkit and after calling the bat file on Windows 7 from a cmd it fixed this issue. Using Ruby 1.9.1

RubyNuby
  • 21
  • 1
0

I also had to install nokogiri to get Watir to install successfully on windows, after installing DevKit. Use: gem install nokogiri

urbanaut
  • 741
  • 2
  • 11
  • 26