Ruby Nokogiri uninitialized constant
- by donald
`<main>': uninitialized constant Object::Nakogiri (NameError)
I get that message when trying to run a simple code (ruby test.rb):
require 'rubygems'
require 'nokogiri'
require 'open-uri'
url = "http://www.walmart.com/cp/Baby-Days/1035659?povid=cat14503-env172199-module122910-lLinksptBABY"
doc = Nakogiri::HTML(open(url))
puts doc.at_css("title").text
I have the gem installed:
~/Code $ gem list --local | grep nokogiri
nokogiri (1.4.4, 1.4.3.1)