5
votes

I was trying to run an OpenSource project which requires ferret to be installed. While installing it using gem install ferret, it's giving this error ->

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

C:/Ruby/bin/ruby.exe extconf.rb creating Makefile

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

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

So, I tried installing nmake (nmake15.exe), but I couldn't find it. It does not install on Windows 7. How can I install ferret?

3
did you ever find an answer? i'm having the same issueTim Hoolihan

3 Answers

1
votes

Some Ruby gems use native extensions, which means they're partially written in C or C++. These gems need to be compiled during installation, which is easy if you're on Linux. Also, most of these gems provide binaries for Windows. However, some gems, like ferret's, don't and still need to be compiled during installation.

The good news is that a toolkit called DevKit makes it easy to build native extensions on Windows. Follow the installation guide here: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

0
votes

nmake is similiar to the make Unix tool used for compiling C and other languages. Some Ruby extensions that use C code need to be compiled.

nmake comes with Visual Studio (C++, C#, and VB). Alternatively, download nmake.exe by itself. Install either and your problem should clear up.

0
votes

Execute Below command and its works

gem install ferret --platform=mswin32