tags:

views:

65

answers:

1

Anyone else having trouble installing cuke4nuke via gem install cuke4nuke?

I'm getting the following error and can't figure out what to do to solve it:

Building native extensions.  This could take a while...
ERROR:  Error installing cuke4nuke:
        ERROR: Failed to build gem native extension.

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

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

I'm running:

Windows 7 32-bit box Ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
RubyGems 1.3.5
edit I also installed the RubyInstaller's devkit

I have the following gems installed:

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
builder (2.1.2)
cucumber (0.6.2, 0.5.0, 0.4.4)
diff-lcs (1.1.2)
fxri (0.3.6)
fxruby (1.6.16)
hpricot (0.6.164)
json (1.2.0)
json_pure (1.2.0)
log4r (1.0.5)
polyglot (0.2.9)
ptools (1.1.6)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7, 0.8.1)
ruby-opengl (0.60.0)
term-ansicolor (1.0.4)
test-unit (2.0.1)
treetop (1.4.3, 1.4.2)
win32-api (1.2.1, 1.2.0)
win32-clipboard (0.4.4)
win32-dir (0.3.2)
win32-eventlog (0.5.0)
win32-file (0.5.5)
win32-file-stat (1.3.1)
win32-process (0.5.9)
win32-sapi (0.1.4)
win32-sound (0.4.1)
win32console (1.2.0)
windows-api (0.2.4)
windows-pr (0.9.3)
A: 

You didn't follow the installation instructions.

The installation instructions say to use the MinGW version of MRI, but you are using the MSVC version. Also, you have to install a C compiler and C build environment, again as per the installation instructions. If you use the MinGW version, you can use the Devkit provided by the RubyInstaller authors, if you use the MSVC version, you need to install the same compiler that was used to compile MRI: Microsoft Visual C 6.0 (which is no longer available and hasn't been for years).

Jörg W Mittag
Looks like you are right. I installed the full version of Visual Studio 2005 Pro to get C++ installed on my machine and it worked fine. Thanks for the help!
Mark Boltuc
Cool. There are some incompatibilities between Microsoft Visual C++ 6.0 (which the OneClick Installer is compiled with) and Visual C++ 8.0 (which you have installed), but if it works then you're probably not running into them.
Jörg W Mittag
I must admit I am a little confused as to *why* you get that error in the first place. The cuke4nuke gem itself doesn't contain any C code. (It contains a couple of pre-compiled .NET DLLs, but since those are precompiled they need no compiler.) It depends on a couple of gems which are written in C: json, win32console, win32-process, but you *already* have those installed, so again there is no need to compile them.
Jörg W Mittag
And a last tip for your next re-install: the OneClick Installer is dead. http://RubyInstaller.Org/ is the future.
Jörg W Mittag