Cannot install RCov from Gem
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 开发者_JAVA技巧folder.
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.
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?
You are correct, it is using GNU make. One option is to install cygwin and install make (under the devel tree in cygwin setup).
精彩评论