Nokogiri parses and edits HTML documents. I have not been able to find out why Nokogiri takes to long to gem install but I believe Rails uses it to compile .erb files. You can use Nokogiri to read and modify HTML documents both locally and by grabbing them from URLs.
###This Line grabs the Nokogiri homepage and stores it as a Nokogiri document. Nokogiri documents are special and do many things that we won't go into
doc = Nokogiri::HTML(open('http://www.nokogiri.org/tutorials/installing_nokogiri.html'))
###Let's parse our Nokogiri doc!
this searches through the menus in the nav bar of the Nokogiri doc and prints out the content of each h2 tag
doc.css('nav ul.menu li a', 'article h2').each do |link| puts link.content end