# Hpricot files

**URL:** <https://www.ruby-forum.com/t/hpricot-files/187682>\
**Category:** Rails\
**Created:** [April 27, 2010, 7:20pm UTC](https://www.ruby-forum.com/t/hpricot-files/187682 "2010-04-27T19:20:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kevid](https://www.ruby-forum.com/u/kevid)\
**Post date:** [April 27, 2010, 7:20pm UTC](https://www.ruby-forum.com/t/hpricot-files/187682/1 "2010-04-27T19:20:26Z")

</div>

hi all,

I need to make use of “Hpricot gem”  
files. I don’t want to install it as a gem. I copied lib/hpricot/\*{all  
files} and lib/hpricot.rb to my application.

below is lib/hpricot.rb

begin  
require ‘encoding/character/utf-8’  
rescue LoadError  
end

#require ‘hpricot\_scan’  
require ‘hpricot/tag’  
require ‘hpricot/modules’  
require ‘hpricot/traverse’  
require ‘hpricot/inspect’  
require ‘hpricot/parse’  
require ‘hpricot/builder’

ALL files loaded properly except “hpricot\_scan”. i can’t find anything  
like hpricot\_scan.rb in the gem’s folder.

Any help is highly appreciated.

---

<div class="post-metadata">

**Author:** ![kevid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kevid](https://www.ruby-forum.com/u/kevid)\
**Post date:** [April 27, 2010, 10:05pm UTC](https://www.ruby-forum.com/t/hpricot-files/187682/2 "2010-04-27T22:05:34Z")

</div>

On Apr 27, 10:17 am, kevid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> rescue LoadError  
> ALL files loaded properly except “hpricot\_scan”. i can’t find anything  
> like hpricot\_scan.rb in the gem’s folder.

You could probably find it through this link:

> **[hpricot/ext/hpricot\_scan at master · whymirror/hpricot](https://github.com/whymirror/hpricot/tree/master/ext/hpricot_scan/)**
>
> master/ext/hpricot\_scan/

Look at the setup.rb file. It should generate hpricot\_scan.rb

Stephan

---

<div class="post-metadata">

**Author:** ![kevid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/e480ec/32.png) [@kevid](https://www.ruby-forum.com/u/kevid)\
**Post date:** [April 27, 2010, 11:10pm UTC](https://www.ruby-forum.com/t/hpricot-files/187682/3 "2010-04-27T23:10:59Z")

</div>

kevid wrote:

> hi all,
> 
> I need to make use of “Hpricot gem”  
> files. I don’t want to install it as a gem. I copied lib/hpricot/\*{all  
> files} and lib/hpricot.rb to my application.

Why not install it as a gem, then unpack it into vendor?

And why aren’t you using Nokogiri?

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
