Reid Thompson

Results 12 comments of Reid Thompson

fixed for my purposed by changing line 177 of current_conditions.rb from #@doc.xpath("/current_observation/#{element_name}[1]/child::text()").first.to_s to @doc.find("/current_observation/#{element_name}[1]/child::text()").first.to_s /usr/local/lib64/ruby/gems/1.8/gems/noaa-0.2.4/lib/noaa/current_conditions.rb:177:in `text_from_node': undefined method`xpath' for #LibXML::XML::Document:0x7fe21411e8f8 (NoMethodError

it appears that current_conditions.rb line 177 def text_from_node(element_name) @doc.xpath("/current_observation/#{element_name}[1]/child::text()").first.to_s end should now read as def text_from_node(element_name) @doc.find("/current_observation/#{element_name}[1]/child::text()").first.to_s end