# Are there plugins available for Hpricot or Mechanize

**URL:** <https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440>\
**Category:** Rails\
**Created:** [November 3, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440 "2008-11-03T23:33:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cswebgrl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Post date:** [November 3, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440/1 "2008-11-03T23:33:21Z")

</div>

Hi All.

Does anyone know if there are plugins available for Hpricot or  
Mechanize? I’d like to install plugins into my rails app instead of  
using gems if that’s possible.

THANKS!

---

<div class="post-metadata">

**Author:** ![cswebgrl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Post date:** [November 4, 2008, 12:17am UTC](https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440/2 "2008-11-04T00:17:51Z")

</div>

> Does anyone know if there are plugins available for Hpricot or  
> Mechanize? I’d like to install plugins into my rails app instead of  
> using gems if that’s possible.

Why not vendor the gems into your rails app?

---

<div class="post-metadata">

**Author:** ![cswebgrl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Post date:** [November 4, 2008, 12:19am UTC](https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440/3 "2008-11-04T00:19:51Z")

</div>

Philip H. wrote:

> Why not vendor the gems into your rails app?

This code is kept up through multiple machines and rather than require  
gem installs for each of them, we wanted to put it into subversion with  
the application if that’s possible.

---

<div class="post-metadata">

**Author:** ![cswebgrl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Post date:** [November 4, 2008, 1:49am UTC](https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440/4 "2008-11-04T01:49:02Z")

</div>

Philip H. wrote:

> rake gems:build # Build any native extensions for  
> unpacked gems  
> rake gems:unpack # Unpacks the specified gem into vendor/  
> gems.  
> rake gems:unpack:dependencies # Unpacks the specified gems and its  
> depende…

Do I need to run a rake gems:install command? Also, do I just create a  
new section in environment.rb and drop this code there?

Thanks.

---

<div class="post-metadata">

**Author:** ![cswebgrl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Post date:** [November 4, 2008, 12:28am UTC](https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440/5 "2008-11-04T00:28:59Z")

</div>

> > Why not vendor the gems into your rails app?
> 
> This code is kept up through multiple machines and rather than require  
> gem installs for each of them, we wanted to put it into subversion  
> with  
> the application if that’s possible.

Right. This should work for you and is part of Rails…

rake gems:build # Build any native extensions for  
unpacked gems  
rake gems:unpack # Unpacks the specified gem into vendor/  
gems.  
rake gems:unpack:dependencies # Unpacks the specified gems and its  
depende…

---

<div class="post-metadata">

**Author:** ![cswebgrl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Post date:** [November 5, 2008, 9:20pm UTC](https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440/6 "2008-11-05T21:20:38Z")

</div>

As a follow-up to how to enable these gems to be packaged within the  
application… how does it work across multiple OS’s? I have Windows  
environments and Linux environments. Is it possible to put these gems  
in vendor/gems and have them work across systems?

---

<div class="post-metadata">

**Author:** ![cswebgrl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Post date:** [November 4, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/are-there-plugins-available-for-hpricot-or-mechanize/152440/7 "2008-11-04T22:58:47Z")

</div>

I also saw this for Rails 2.1 that I could put into the environment.rb  
file.

config.gem “hpricot”, :version =\> ‘0.6’, :source  
=\>[http://code.whytheluckystiff.net](http://code.whytheluckystiff.net)"

If I put this code in environment.rb, then I’ll still need to run  
rake:gems install on each machine that this application is installed on,  
correct? I’d really like to avoid needing to do an additional step if  
gems need to be installed.

Can I create a rake task (rake:install, etc.) that would automatically  
install the gem if it’s not already on the system prior to starting the  
server?
