# Install Hpricot gem failure

**URL:** <https://www.ruby-forum.com/t/install-hpricot-gem-failure/196313>\
**Category:** Ruby\
**Created:** [October 11, 2010, 2:52pm UTC](https://www.ruby-forum.com/t/install-hpricot-gem-failure/196313 "2010-10-11T14:52:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![flebber](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f9ae1b/32.png) [@flebber](https://www.ruby-forum.com/u/flebber)\
**Post date:** [October 11, 2010, 2:52pm UTC](https://www.ruby-forum.com/t/install-hpricot-gem-failure/196313/1 "2010-10-11T14:52:34Z")

</div>

I am trying to install Hpricot but receive a build tools error from  
gem install. However I can install nokogiri gem can actually even  
figure I can’t type and fixed up my nokogirl entry.

What do I need to do with hpricot.

This is my install

C:\rubygems-1.3.7\>gem install hpricot  
Building native extensions. This could take a while…  
ERROR: Error installing hpricot:  
ERROR: Failed to build gem native extension.

C:/Ruby192/bin/ruby.exe extconf.rb  
checking for stdio.h… \*\*\* extconf.rb failed \*\*\*  
Could not create Makefile due to some reason, probably lack of  
necessary libraries and/or headers. Check the mkmf.log file for more  
details. You may need configuration options.

Provided configuration options:  
–with-opt-dir  
–without-opt-dir  
–with-opt-include  
–without-opt-include=${opt-dir}/include  
–with-opt-lib  
–without-opt-lib=${opt-dir}/lib  
–with-make-prog  
–without-make-prog  
–srcdir=.  
–curdir  
–ruby=C:/Ruby192/bin/ruby  
C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:452:in`try\_cpp’  
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header' from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:693:in`block in  
checking\_for’  
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone' from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in`open’  
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone' from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in`open’  
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:276:in `postpone' from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:692:in`checking\_for’  
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:833:in `have_header' from extconf.rb:2:in`’

Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/  
hpricot-0.8.2 for inspection.  
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2/  
ext/fast\_xs/gem\_make.out

C:\rubygems-1.3.7\>gem install try\_do  
ERROR: Could not find a valid gem ‘try\_do’ (\>= 0) in any repository

C:\rubygems-1.3.7\>gem try\_do hpricot  
ERROR: While executing gem … (RuntimeError)  
Unknown command try\_do

C:\rubygems-1.3.7\>gem install try\_cpp  
ERROR: Could not find a valid gem ‘try\_cpp’ (\>= 0) in any repository

C:\rubygems-1.3.7\>gem install nokogirl

* * *

It’s actually spelled nokogiri, not nokogirl

* * *

Successfully installed nokogiri-1.4.3.1-x86-mingw32  
Successfully installed nokogirl-1.0  
2 gems installed  
Installing ri documentation for nokogiri-1.4.3.1-x86-mingw32…  
Installing ri documentation for nokogirl-1.0…  
Installing RDoc documentation for nokogiri-1.4.3.1-x86-mingw32…  
Installing RDoc documentation for nokogirl-1.0…

C:\rubygems-1.3.7\>

PS package management that picks up typo’s pretty narly

---

<div class="post-metadata">

**Author:** ![flebber](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f9ae1b/32.png) [@flebber](https://www.ruby-forum.com/u/flebber)\
**Post date:** [October 11, 2010, 4:15pm UTC](https://www.ruby-forum.com/t/install-hpricot-gem-failure/196313/2 "2010-10-11T16:15:06Z")

</div>

On 10/11/2010 7:38 AM, flebber wrote:

> I am trying to install Hpricot but receive a build tools error from  
> gem install. However I can install nokogiri gem can actually even  
> figure I can’t type and fixed up my nokogirl entry.
> 
> What do I need to do with hpricot.

From the look of things, nokogiri installed successfully because a  
binary version of it was installed, thus avoiding the need to build it  
yourself. Apparently, there is no such binary build of hpricot for your  
platform (x86-mingw32). You need to install the DevKit associated with  
your Ruby installation. I believe you need this one:

[http://github.com/downloads/oneclick/rubyinstaller/DevKit-4.5.0-20100819-1536-sfx.exe](http://github.com/downloads/oneclick/rubyinstaller/DevKit-4.5.0-20100819-1536-sfx.exe)

Which I located via:

> **[Downloads](https://rubyinstaller.org/downloads/)**
>
> The easy way to install Ruby on Windows This is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important...

> Installing ri documentation for nokogirl-1.0…  
> Installing RDoc documentation for nokogiri-1.4.3.1-x86-mingw32…  
> Installing RDoc documentation for nokogirl-1.0…
> 
> C:\rubygems-1.3.7\>
> 
> PS package management that picks up typo’s pretty narly

Notice that there is actually a gem named nokogirl-1.0 installed along  
with nokogiri-1.4.3.1-x86-mingw32. My guess is that this particular  
typo is so common that someone made a dummy gem named nokogirl that  
simply depends upon the latest version of nokogiri. As part of its  
installation, nokogirl spits out that message about spelling.

There is no magic here. 😉

-Jeremy

---

<div class="post-metadata">

**Author:** ![flebber](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f9ae1b/32.png) [@flebber](https://www.ruby-forum.com/u/flebber)\
**Post date:** [October 11, 2010, 5:59pm UTC](https://www.ruby-forum.com/t/install-hpricot-gem-failure/196313/3 "2010-10-11T17:59:56Z")

</div>

On Oct 11, 9:33 am, flebber [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I am trying to install Hpricot but receive a build tools error from  
> gem install. However I can install nokogiri gem can actually even  
> figure I can’t type and fixed up my nokogirl entry.
> 
> What do I need to do with hpricot.
> 
> This is my install

Please read the output of the failure:

> C:\rubygems-1.3.7\>gem install hpricot  
> Building native extensions. This could take a while…  
> ERROR: Error installing hpricot:

> C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try\_do’: The complier failed  
> to generate an executable file. (RuntimeError)  
> You have to install development tools first.

You need to install the DevKit:

> **[Development Kit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit)**
>
> RubyInstaller for Windows - Build recipes. Contribute to oneclick/rubyinstaller development by creating an account on GitHub.
