1

I want to install Mechanize, but it looks like there are two gems. Should I need to install both "mechanize-downloader" and "mechanize", or only "mechanize"?

gem install mechanize-downloader 
gem install mechanize

Or:

gem install mechanize
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317

1 Answers1

0

Mechanize is the main gem, and is used to automate interactions with websites (including downloading files).

mechanize-downloader is a gem for downloading files with a progress bar. It extends Mechanize to provide a progress bar as the files are being downloaded.

Running gem install mechanize-downloader installs Mechanize as well since it is a dependency. Mechanize is a standard, and it's easy to get help should you run into problems.

Take a look at "Using WWW:Mechanize to download a file to disk without loading it all in memory first" for an example of how to download files using Mechanize.

For a more general introduction to working with Mechanize, check out "#191 Mechanize.

"Mechanize examples"" is another useful resource.

Community
  • 1
  • 1
Prakash Murthy
  • 12,923
  • 3
  • 46
  • 74
  • Mechanize-downloader requires Mechanize, and doesn't run separately. Instead, it extends Mechanize allowing a progress bar as files are retrieved. It doesn't run by itself. – the Tin Man Jan 21 '13 at 18:11