Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install ferret gem on Windows 7?

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?

like image 316
Rav Avatar asked Nov 15 '22 11:11

Rav


1 Answers

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

like image 154
Hatem Mahmoud Avatar answered Dec 15 '22 02:12

Hatem Mahmoud