# Problems with using gem (hpricot ) on shared hosting

**URL:** <https://www.ruby-forum.com/t/problems-with-using-gem-hpricot-on-shared-hosting/154862>\
**Category:** Deployment\
**Created:** [December 4, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/problems-with-using-gem-hpricot-on-shared-hosting/154862 "2008-12-04T16:59:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jul1an](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@jul1an](https://www.ruby-forum.com/u/jul1an)\
**Post date:** [December 4, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/problems-with-using-gem-hpricot-on-shared-hosting/154862/1 "2008-12-04T16:59:56Z")

</div>

I get a shared web hosting from eleven2  
They have a cpanel that let you install and update gems  
But i don’t know how to use them

I used cpanel to update hpricot gem  
I found it installed in /ruby/gems/gems/hpricot-0.6.164  
This is the modifications of my source code that i meda to use it

This is what eleven2 site tell me to do:  
$:.push("/home/julianne/ruby/gems")

and i required the gem  
require ‘hpricot’ # Fast, flexible HTML parser

But i get an error message: no such file to load – hpricot

What can i do to fix this error  
I there a way to use preferable the gems that i install using cpanel  
instead of this instaled in web hosting?

---

<div class="post-metadata">

**Author:** ![jul1an](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@jul1an](https://www.ruby-forum.com/u/jul1an)\
**Post date:** [December 4, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/problems-with-using-gem-hpricot-on-shared-hosting/154862/2 "2008-12-04T17:49:41Z")

</div>

Ju Lian wrote:

> I get a shared web hosting from eleven2  
> They have a cpanel that let you install and update gems  
> But i don’t know how to use them
> 
> I used cpanel to update hpricot gem  
> I found it installed in /ruby/gems/gems/hpricot-0.6.164  
> This is the modifications of my source code that i meda to use it
> 
> This is what eleven2 site tell me to do:  
> $:.push("/home/julianne/ruby/gems")
> 
> and i required the gem  
> require ‘hpricot’ # Fast, flexible HTML parser
> 
> But i get an error message: no such file to load – hpricot
> 
> What can i do to fix this error  
> I there a way to use preferable the gems that i install using cpanel  
> instead of this instaled in web hosting?

I managed to run it without e problems when used

$:.push("~/ruby/gems/gems/hpricot-0.6.164/lib/")  
$:.push("~/ruby/gems/gems/hpricot-0.6.164/lib/universal-java1.6")

but I don’t know why I have to specify this paths ☹

this what i run is my task, with  
rake rss:generate

---

<div class="post-metadata">

**Author:** ![jul1an](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@jul1an](https://www.ruby-forum.com/u/jul1an)\
**Post date:** [January 21, 2009, 6:35am UTC](https://www.ruby-forum.com/t/problems-with-using-gem-hpricot-on-shared-hosting/154862/3 "2009-01-21T06:35:46Z")

</div>

> $:.push("~/ruby/gems/gems/hpricot-0.6.164/lib/")  
> $:.push("~/ruby/gems/gems/hpricot-0.6.164/lib/universal-java1.6")

Can you please let me know in what file you put these paths?
