Can't install win32-service on winxp

J

Jeff

I'm trying to setup Ruby and some gems on a clean WinXP SP2 box, and I
can't install win32-service:

c:\dev>gem install win32-service
Building native extensions. This could take a while...

ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.5.2 for inspection.

Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.5.2/gem_make.out

The gem_make.out file is actually just empty, so no help there.

I initially discovered this trying to install mongrel 0.13.3 (win32),
and saw that it was dying when it had to install win32-service as a
dependency.

i tried removing the win32-service.gem file from the gems cache
directory (as well as the gems folder itself) before reinstalling, but
that didn't help.

I've been able to install mongrel and win32-service on other windows
machines before, so it must be something about my environment, but I
can't figure out what.

When I say I have a "clean" machine, I mean a fresh install of WinXP
w/SP2, plus the Ruby OCI, plus the subversion client. But that's
really all I've done to the image.

Any ideas?

Thanks!
Jeff
 
D

Daniel Berger

Jeff said:
I'm trying to setup Ruby and some gems on a clean WinXP SP2 box, and I
can't install win32-service:

c:\dev>gem install win32-service
Building native extensions. This could take a while...

ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.5.2 for inspection.

You need a C compiler. You have one installed, right?
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.5.2/gem_make.out

The gem_make.out file is actually just empty, so no help there.

I think this is a bug in gems that I've been meaning to ask Chad about.
It happens on all platforms when a build fails afaict.
I've been able to install mongrel and win32-service on other windows
machines before, so it must be something about my environment, but I
can't figure out what.

I think Luis Lavena built a gem that included a binary instead of
forcing you to build, but I'll have to ask.

In the meantime, if you don't have a compiler, you can grab the shared
object from the RubyForge project page at
https://rubyforge.org/frs/download.php/15016/service-0.5.2-vc6.so.
Rename the file to just "service.so" and install it in
C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt\win32.

Regards,

Dan
 
D

dave

I'm having the same problem as Jeff. I tried your solution, and now
when I do a require "win32/service" it works, however, I need
win32-service in order to install mongrel, yet when trying to install
win32-service from gem I get the same error message Jeff got.

I'm a total ruby noob, so I'm not quite sure about the whole C compiler
- where to get one - what to do with it, why I would need that and how
that makes this error go away?

Any help is appreciated.

Thanks!
 
D

Daniel Berger

I'm having the same problem as Jeff. I tried your solution, and now
when I do a require "win32/service" it works, however, I need
win32-service in order to install mongrel, yet when trying to install
win32-service from gem I get the same error message Jeff got.

If you've got the shared object installed, you've got win32-service
(sans documentation). You don't need the gem.

- Dan
 
D

dave

(sans documentation). You don't need the gem.

- Dan

Hi Dan,

For some reason it's still now working for me.

I do a gem install mongrel and it says:
you need to install win32-service, Y or N. I say Y, it barfs (with same
error as stated above).

I do a gem install mongrel and it says:
you need to install win32-service, Y or N: I say N, it says required
dependency win32-service not installed
and then aborts the install.

Thanks for your help!
 
D

Daniel Berger

Hi Dan,

For some reason it's still now working for me.

I do a gem install mongrel and it says:
you need to install win32-service, Y or N. I say Y, it barfs (with same
error as stated above).

Then say 'N'. You've already got it.

Regards,

Dan
 
D

dave

Regards,

Dan

I say N, it says required dependency win32-service not installed and
then aborts the install.
Mongrel gem install won't let me go any further.

Do you know what the issue is with XP SP2 that won't allow you to
install win32-service via gem in the first place?
Maybe I could try to get that working and all would be better.

Thanks,

DC
 
D

Daniel Berger

I say N, it says required dependency win32-service not installed and
then aborts the install.
Mongrel gem install won't let me go any further.

Something's wrong then. If win32-service is installed, the gem install
should pick that up and not even bother asking you about it. Perhaps
I'll look into distributing this as a binary instead of forcing a
compile, if possible.

In the meantime, I suggest downloading the mongrel source and installing
manually instead of using gems for now.
Do you know what the issue is with XP SP2 that won't allow you to
install win32-service via gem in the first place?

Sounds like you lack a C compiler. Otherwise it should work.

Regards,

Dan
 
D

dave

should pick that up and not even bother asking you about it. Perhaps
I'll look into distributing this as a binary instead of forcing a
compile, if possible.

In the meantime, I suggest downloading the mongrel source and installing
manually instead of using gems for now.


Regards,

Dan

Yes, I don't have a C compiler. Is there one you recommend?
Also, do I need to do something special once I get one?

Thanks again for your help.

Dave
 
J

Jeff

Daniel said:
Perhaps
I'll look into distributing this as a binary instead of forcing a
compile, if possible.

That would be great... please do so if possible. :)

Thanks!
Jeff
 
A

adam.blum

Is the gem available in binary form at all? The compile fails for me
with my recent (VS2005) C++ compiler.

I'm curious if you ever got this resolved, because I'm having a similar
problems getting win32-service working on a new machine (although I
have it running on others). But my mongrel startup fails due to lack
of win32-service extensions.

I do have the shared object (service-0.5.2-vc6.so) installed.
 
D

Daniel Berger

Jeff said:
That would be great... please do so if possible. :)

Thanks!
Jeff

Alright people, listen up. There are now two gems for win32-service.
If you just want the binary, use the "mswin32" gem. If you want to
build from source use the "plain" gem. Capiche?

And, in case you're wondering why you would ever want to build from
source when you've got the binary option, the answer is that the binary
I'm distributing was built with VC++ 6.0. That means that the
Win32Service struct will be missing the pid and service_flags members,
and the Service.services method won't support the second (group) argument.

Regards,

Dan
 
D

dave

If you just want the binary, use the "mswin32" gem. If you want to
build from source use the "plain" gem. Capiche?

And, in case you're wondering why you would ever want to build from
source when you've got the binary option, the answer is that the binary
I'm distributing was built with VC++ 6.0. That means that the
Win32Service struct will be missing the pid and service_flags members,
and the Service.services method won't support the second (group) argument.

Regards,

Dan

Friggn schweet, Dan.
Thanks for the quick turnaround. You da man!

(for those who didn't understand what Dan said, just do a "gem install
win32-service" again and it'll give you install options. Pick #2.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top