Gems can be used to extend or modify functionality in Ruby applications. Commonly they’re used to distribute reusable functionality that is shared with other Rubyists for use in their applications and libraries. Some gems provide command line utilities to help automate tasks and speed up your work.
The RubyGems software allows you to easily download, install and use Ruby software packages on your system. The software package is called a gem and contains a packaged Ruby application or library.
media.domain.com since they will be ignored when crawling domain.compage object in the on_every_page block above has a .doc method which returns the Nokogiri document for the HTML body of the page. This means you can use Nokogiri selectors inside the on_every_page block such as page.doc.css('div#id')