Hi I am trying to follow the RailsCast to use Nokogiri.
Just a few very basic lines in my testing script file: require 'rubygems' require 'nokogiri' require 'open-url'
url = "http://ift.tt/1ewgqvz" doc = Nokogiri::HTML(open(url)) puts doc.at_css("title").text
But when I execute it, I run into an error: /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- open-url (LoadError) from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in
require' from nokogiri.test.rb:3:in `'
I did install open url gem following this instruction:http://ift.tt/1Ro35ne How do I fix the error message?
Aucun commentaire:
Enregistrer un commentaire