On Jan 14, 2:00 ¨Βν¬ ΑαςοΠαττεςσοΌαα®®®ΐτεξδεςμοφεναλιξη®γονΎ wrote: > 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 > > ¨Βςο―Υσεςσ―ναςλχ―βιξ―κςυβω―μιβ―ςυβω―ηενσ―±®Έ―ηενσ―ξολοηιςι±®±®±> > java/lib/nokogiri/html.rb:36:in `parse' > > ¨Βςο―Υσεςσ―ναςλχ―βιξ―κςυβω―μιβ―ςυβω―ηενσ―±®Έ―ηενσ―ξολοηιςι±®±®±> > java/lib/nokogiri/html.rb:15:in `HTML' > > ¨Βςο¨ιςβ©Ί> > ¨Βςο―Υσεςσ―ναςλχ―βιξ―κςυβω―μιβ―ςυβω―±®Έ―ιςβ®ςβΊ±µ°Ίιΰεφαμίιξπυτ§ > > > I am using version jruby 1.1.5 - will a later version of JRuby make > > this work? > > No. ¨Βξζοςτυξατεμω τθκςυβςεμεασισ σοςτ οζ μιε®®® ¨Βδοεσξ§> actually work on jruby. ¨Β§φβεεξ ςεμεασιξκςυβφεςσιοσο τθατ > webrat can use it's CSS to XPath conversion code, then fall back on > REXML. > > We're working on a better jruby solution though. ¨Βε§φε ηοβςαξγθ > that uses FFI, and Charles Nutter has a branch with a Java > implementation. > > ¨ΒττπΊ――ηιτθυβ®γον―θεαδιυσ―ξολοηιςι―τςεε―ναστε> > I'm not sure what the status is on his branch. > > -- > Aaron Pattersonhttp://tenderlovemaking.com/ Thanks Aaron for the update on Charles' and your branches. I am using nokogiri in 2 examples in a new Ruby book that I am writing for APress; I had a warning about JRuby incompatibility (and have a little code using a pure Ruby alternative), but by the time the book is published (5 months) it looks like we will have a working version for JRuby. I could be of more help with the pure Java version, so I will as Charles if he wants help.