"require": cannot load such file-- open-url(LoadError)

681 views Asked by At

Here's my .rb code. Kindly help please, thank you so much!

require 'open-uri'
require 'nokogiri'

url = "http://en.wikipedia.org/wiki/List_of_current_NBA_team_rosters"
page = Nokogiri::HTML(open(uri))

puts page

This is the error appear in my command prompt:

C:\Sites>ruby wikipedia_scraper.rb C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- open-url (LoadError from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from wikipedia_scraper.rb:1:in `'

0

There are 0 answers