From: Aaron Patterson Date: 2009-01-15T06:00:23+09:00 Subject: Re: nokogiri 1.1.1 Released On Thu, Jan 15, 2009 at 05:44:05AM +0900, Mark Watson wrote: > Thanks Aaron for your work on Nokogiri. > > I noticed what looked like JRuby support so I tried installing the gem > (worked) and then an example that failed: > > irb(main):001:0> require 'nokogiri' > => true > irb(main):002:0> require 'open-uri' > => true > irb(main):003:0> doc = Nokogiri::HTML(open('http://markwatson.com')) > NoMethodError: undefined method `read_memory' for > Nokogiri::HTML::Document:Class > from /Users/markw/bin/jruby/lib/ruby/gems/1.8/gems/nokogiri-1.1.1- > java/lib/nokogiri/html.rb:36:in `parse' > from /Users/markw/bin/jruby/lib/ruby/gems/1.8/gems/nokogiri-1.1.1- > java/lib/nokogiri/html.rb:15:in `HTML' > from (irb):4 > from /Users/markw/bin/jruby/lib/ruby/1.8/irb.rb:150:in `eval_input' > > I am using version jruby 1.1.5 - will a later version of JRuby make > this work? No. Unfortunately the jruby release is sort of a lie.... It doesn't actually work on jruby. I've been releasing a jruby version so that webrat can use it's CSS to XPath conversion code, then fall back on REXML. We're working on a better jruby solution though. We've got a branch that uses FFI, and Charles Nutter has a branch with a Java implementation. http://github.com/headius/nokogiri/tree/master I'm not sure what the status is on his branch. -- Aaron Patterson http://tenderlovemaking.com/