tags:

views:

1156

answers:

3

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

A: 

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

c00lryguy
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
+2  A: 

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
Yes, this is what I did =) Thanks though
c00lryguy
Don't want to put your statement on doubt, but are you sure? I've managed to compile most of the Windows gems with the DevKit without issues, including win32utils ones.
Luis Lavena
A: 

Execute Below command and its works

gem install watir --platform=mswin32

Amit