Win32-service gem

Hey all, has anyone been able to use win32-service-0.7.0.gem. when I try
to
install the gem it fails wanting nmake. I got that setup on my box, and
now
I get the below. I don’t know what it wants. Any ideas?

OS - Windows XP
Ruby Version - ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

C:/Ruby/bin/ruby.exe extconf.rb install win32-service
checking for strncpy_s()… no
creating Makefile

nmake

Microsoft ® Program Maintenance Utility Version 1.50
Copyright © Microsoft Corp 1988-94. All rights reserved.

    C:\Ruby\bin\ruby -e "puts 'EXPORTS', 'Init_api'"  >

api-i386-mswin32.def
cl -nologo -I. -I. -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -I. -MD
-Zi
-O2b2xg- -G6 -c -Tcwin32/api.c
‘cl’ is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: ‘C:\WINDOWS\system32\cmd.exe’ : return code
‘0x1’
Stop.

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

On Thu, Jun 16, 2011 at 10:39 PM, Daniel S.
[email protected] wrote:

‘cl’ is not recognized as an internal or external command,
operable program or batch file.

Well, have you setup nmake, or Visual Studio 6? This looks like parts
of the compiler toolchain is missing (maybe the C linker?).

Keep in mind: Ruby has been moved off Visual Studio since 1.8.7 (and
1.8.6 will be phased out of support in a while!), using an easily
available compiler toolchain (and a Dev Package that makes it trivial
to install gems requiring native extensions, as long as those
extensions are well written).


Phillip G.

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
– Leibnitz

On Jun 16, 5:39pm, Daniel S. [email protected]
wrote:

checking for strncpy_s()… no
-O2b2xg- -G6 -c -Tcwin32/api.c
‘cl’ is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: ‘C:\WINDOWS\system32\cmd.exe’ : return code ‘0x1’
Stop.

Seems your version of Ruby was build with Visual Studio, you need
Visual Studio installed to be able to compile gems (which is the case
for win32-api one)

On Jun 16, 10:45pm, Daniel S. [email protected]
wrote:

[Note: parts of this message were removed to make it a legal post.]

thanks for responding so quickly! I’ll look into this. Since Phillip
brought up the point of 1.8.6. Is the upgrade to 1.8.7+ pretty straight
forward? As in still a one click install, etc.?

You can’t (and shouldn’t) install RubyInstaller on top of old One-
Click Ruby Installer.

RubyInstaller by default installs in a different directory and pretty
much everything that worked for 1.8.6 will work with 1.8.7

The case about win32-service gem is a different one, since it used to
depend on SEH (Structured Exception Handling) which was not supported
by GCC (is a MS extension to C)

I believe that has already fixed, but you can clearly install in a
separate Ruby directory and try it out, removing it later.

Download RubyInstaller from it’s website:

And read the details about installation of Development Kit (needed to
compile some gems):

thanks for responding so quickly! I’ll look into this. Since Phillip
brought up the point of 1.8.6. Is the upgrade to 1.8.7+ pretty straight
forward? As in still a one click install, etc.?