Steely Wing
Steely Wing

Reputation: 17597

Nokogiri in Ruby 2.0

When I require 'nokogiri' in Ruby 2.0, it has a error

`require': cannot load such file -- nokogiri/2.0/nokogiri (LoadError)

Is nokogiri not supporting Ruby 2.0 yet? I can see nokogiri in gem list

Upvotes: 4

Views: 3939

Answers (3)

Steely Wing
Steely Wing

Reputation: 17597

Nokogiri now support Ruby 2.0, even on Windows, see HERE

Upvotes: 0

Mike Dalessio
Mike Dalessio

Reputation: 1350

Ruby 2.0 support is not yet available for Windows. Follow along here for updates:

Upvotes: 2

the Tin Man
the Tin Man

Reputation: 160551

Yes, it works fine:

RUBY_VERSION # => "2.0.0"
require 'nokogiri'
doc = Nokogiri::HTML('<html><body><p>foo</p></body></html>')
doc.at('p').text # => "foo"

Upvotes: 0

Related Questions