Forum: Ruby on Rails Are there plugins available for Hpricot or Mechanize

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
666bc1afacbfb59f8e511faad9f31e64?d=identicon&s=25 Cs Webgrl (cswebgrl)
on 2008-11-03 23:33
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!
2505b282d57c29be797dc35b245adb4c?d=identicon&s=25 Philip Hallstrom (Guest)
on 2008-11-04 00:17
(Received via mailing list)
> 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?
666bc1afacbfb59f8e511faad9f31e64?d=identicon&s=25 Cs Webgrl (cswebgrl)
on 2008-11-04 00:19
Philip Hallstrom 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.
2505b282d57c29be797dc35b245adb4c?d=identicon&s=25 Philip Hallstrom (Guest)
on 2008-11-04 00:28
(Received via mailing list)
>> 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...
666bc1afacbfb59f8e511faad9f31e64?d=identicon&s=25 Cs Webgrl (cswebgrl)
on 2008-11-04 01:49
Philip Hallstrom 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.
666bc1afacbfb59f8e511faad9f31e64?d=identicon&s=25 Cs Webgrl (cswebgrl)
on 2008-11-04 22:58
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"


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?
666bc1afacbfb59f8e511faad9f31e64?d=identicon&s=25 Cs Webgrl (cswebgrl)
on 2008-11-05 21:20
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?
This topic is locked and can not be replied to.