Q:

xpath/css href not printing

I am trying to print the href of a html doc, however I am not able to do so. 
newurl = 'http://www.heroesfire.com/hots/guide/the-many-ways-of-abathur-1194'
    buildpage = Nokogiri::HTML(open(newurl))
        #puts buildpage
        thistext = buildpage.css("div#wrap div#site-content.self-clear div#guide.view-guide div.col-l div.tab-contents.box div.guide-tab div.chapter-text div.text table.bbcode_columns tbody tr td.bbcode_column a").each do |href|
          puts href['href']
        end

I am expecting to see '/hots/wiki/talents/pressurized-glands'
I was able to get something similar to work earlier in my script, but I am having zero luck with this. 

A:

Invariably, the longer the Node selector, the less likely it will work correctly, especially if you're dealing with HTML you don't control. 
Reduce it to find way-points, places that help you drill down instead of trying to define each step. 
You're also relying on tbody in the selector. When we see that, the odds are good that it's not in the original HTML source but instead was injected by your browser. Selectors like that smell of using a browser and an inspector to locate a particular item in the page, but the resulting path won't work if the HTML doesn't actually contain tbody. Browsers do a lot of fix-up in an attempt to present something useful, including adding tags. So be careful when you see tbody and confirm it actually exists. In your case, it does, but the concern still exists when navigating through a document.
A simple example of simplifying the path is:
require 'nokogiri'

doc = Nokogiri::HTML(<<EOT)
<html>
  <body>
  <div id="foo">
    <div id="bar">
      <p>text1</p>
    </div>
    <div id="baz">
      <p>text2</p>
    </div>
  </div>
  </body>
</html>
EOT

doc.at('body div#foo div#bar p').text # => "text1"

Can be written more easily, while still accomplishing the same thing, using:
doc.at('#bar p').text # => "text1"

or perhaps one of these:
doc.at('#foo div p').text # => "text1"
doc.search('#foo div p').first.text # => "text1"

All scraping requires at least some advance knowledge of the target page's structure, so, while you're nosing around, take note of the important layout tags. id parameters are especially useful, followed by class and/or unique patterns of tags not replicated elsewhere in the document. Those make it easy to reduce the selector. Sometimes we have to step into the document incrementally like I did using first or one of the "sibling" methods after locating a particular node, but using a long selector rarely is needed.

