tags:

views:

121

answers:

3
gem install rcov

Error:

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

"C:/Program Files/Ruby191/bin/ruby.exe" extconf.rb
creating Makefile

make
Makefile:154: warning: overriding commands for target `C:/Program'
Makefile:148: warning: ignoring old commands for target `C:/Program'
make: *** No rule to make target `"/C/Program', needed by `callsite.o'.  Stop.


Gem files will remain installed in C:/Program Files/Ruby191/lib/ruby/gems/1.9.1/gems/rcov-0.9.8 for inspection.
Results logged to C:/Program Files/Ruby191/lib/ruby/gems/1.9.1/gems/rcov-0.9.8/ext/rcovrt/gem_make.out

This output is now after installing DevKit - to the root Ruby folder.

A: 

The gem you're trying to use needs to compile native extensions (code which is compiled per system), and for that, it's using a makefile. Have you tried installing make?

Daniel Vandersluis
+2  A: 

Indeed, Gem is trying to compile the software for your OS (Windows, apparently).

If you are using the RubyInstaller (rather than the incomplete packages at http://ruby-lang.org), you should add the DevKit and you will get tools like make, gcc, etc. that will be able to compile many of the gems natively.

Otherwise, you should be able to use the Win32 binary version of the Rcov gem.


Sadly, the DevKit can't always compile every gem on Win32. But first, a question: did you follow Step 2 of the DevKit's installation instructions to edit the fstab file? If so, then the next best thing to do is email the RubyInstaller Google Group with details of the compilation problem.

I just tried the Win32 binary rcovrt.so from the Rcov site on my own Windows box, but it doesn't recognize as a valid Windows image, at least with my Ruby 1.9 installation... so figuring out how to make the DevKit compilation to work may be your best bet.

ewall
Dev kit seemed to work - but I receive a new error now. Updated question to reflect this.
Finglas
looks like you now need to move your ruby to somewhere without spaces in the pathname
rogerdpack
Indeed... the `C:/Program Files/Ruby191/lib/ruby/gems/1.9.1/gems/rcov-0.9.8/ext/rcovrt/gem_make.out` file will probably show if make isn't escaping or quoting the file paths correctly.
ewall
A: 

You are correct, it is using GNU make. One option is to install cygwin and install make (under the devel tree in cygwin setup).

Nate Pinchot