Problem in Rail Casts Episode 190
- by Gautam
Hello,
This is the code I have written
require 'rubygems'
require 'nokogiri'
require 'open-uri'
url = "http://timesofindia.indiatimes.com/rssfeeds/-2128838597.cms"
doc = Nokogiri::HTML(open(url))
puts doc.at_css("title").text
and I am getting this output.
I have installed Nokogiri. I use Windows 7
C:\Ruby>ruby hello.rb
C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri/nokogiri.rb:1:in `require': 127: The specified procedure could not be found. - Init_nokogiri (LoadError)
C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri/1.9/nokogiri.so
from C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri/nokogiri.rb:1:in `<top (required)>'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri.rb:13:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.2-x86-mingw32/lib/nokogiri.rb:13:in `<top (required)>'
from hello.rb:2:in `require'
from hello.rb:2:in `<main>'