You don't seem to need Nokogiri, so you need to do this.
uninitialized constant Video::Nokogiri
- distribution. Ruby knows that the Nokogiri is constant, but does not know where to find it.
In your code, Nokogiri uses an Open-URI to retrieve the content, so you also need require 'open-uri' . Nokogiri reads a file descriptor that returns an Open-URI open .
This section can be written more briefly:
if xmlfeed.at_xpath("//openSearch:totalResults").content.to_i == 0 return false else return true end
as:
!(xmlfeed.at_xpath("//openSearch:totalResults").content.to_i == 0)
or
!(xmlfeed.at("//openSearch:totalResults").content.to_i == 0)
source share