Home > JRuby, Java, Programming, Ruby > Helping Nokogiri. Take II

Helping Nokogiri. Take II

December 31st, 2009 Serabe Leave a comment Go to comments
PIZZA PRO 3000
Nokogiri and Pizza, what else can you ask for?

Ok. My fault. Now, let’s go get some work done.

First, if you haven’t done it, read the previous post about helping nokogiri and forgot about the script and memory leak. It seems that there are more important issues, so let’s fix them first. First run jruby test/test_jruby.rb from Nokogiri root. You’ll see a lot of errors (27 by now) and failures (14). Choose one, and get it green. After that, send me a pull request.

Ok. That sounds simple, but what if  the number of errors or failures raises? The rule I use is simple: keep the sum of both numbers going down and having a failure is better than having an error.

On the other hand, if you take a look at test/test_jruby.rb, you’ll see that not every test is in there. There is a reason for that. Even keeping the number of test low, you get a lot of errors/failures. If that annoys me with just 50 failures, imagine if I had a couple of hundreds errors. When all is right, I’ll add some more to keep the fun on.

Photo by Paul Johnston.

  • Share/Bookmark

Related posts:

  1. Status Update: RMagick4J, Nokogiri, ruby2java and a possible MagickWand4J
  2. Final Status Update (or How to get Nokogiri in JRuby without FFI)
  3. Do you wanna help us with pure-Java Nokogiri?
  4. Canción del Syntax Error.
  5. RMagick4J 0.3.7 Happy Birthmonth released.
Categories: JRuby, Java, Programming, Ruby Tags: ,
  1. January 4th, 2010 at 19:44 | #1

    Maybe i did something wrong, but it says to me:

    /home/nils/HelpingJRubyNokogiri/nokogiri/lib/nokogiri.rb:17:in `require’: no such file to load — nokogiri/nokogiri (LoadError)
    from /home/nils/HelpingJRubyNokogiri/nokogiri/lib/nokogiri.rb:17
    from /home/nils/HelpingJRubyNokogiri/nokogiri/lib/nokogiri.rb:8:in `require’
    from /home/nils/HelpingJRubyNokogiri/nokogiri/test/helper.rb:8
    from /home/nils/HelpingJRubyNokogiri/nokogiri/test/helper.rb:2:in `require’
    from ./test/test_reader.rb:2
    from ./test/test_reader.rb:10:in `load’
    from test/test_jruby.rb:10

    Did i something wrong, or is there a file missing ? Obviously i am a noob, but i wanted so have look at how difficult it is to help, and if i am able to perhaps.

  2. January 4th, 2010 at 20:12 | #2

    Have you done a jruby -S rake java:spec?

  3. January 4th, 2010 at 22:44 | #3

    Yeah, that was the point. Shame on me. Should sleep more this night. Thank you. :-)

  4. January 4th, 2010 at 22:52 | #4

    Thank to you. Take a look at it and, if you have any other question, late me know. You can contact me here, gmail or github.

  5. January 7th, 2010 at 18:05 | #5

    Hrm. I have had a look at the tests now, but i guess i need a short briefing about the way to fix them, espacially WHERE the missing methods need to be added. Could you give a short example on this one perhaps?

    18) Error:
    test_line(Nokogiri::XML::TestNode):
    NoMethodError: undefined method `line’ for #
    ./test/xml/test_node.rb:735:in `test_line’

    I have never done or tried something like this before, but i will be a good learner. :-)

  6. January 8th, 2010 at 03:31 | #6

    You can take a look at the first part of a tutorial on writing JRuby extensions.

    Concretely that bug is a bit tricky, I suggest you to choose another one.

  7. Stephen Bannasch
    January 12th, 2010 at 02:34 | #7

    Running: jruby -S rake java:spec in Java 1.5 on Mac OS X 10.5.8 generate this stacktrace:

    http://gist.github.com/274754

    It works when I switch to Java 1.6

  8. January 14th, 2010 at 20:50 | #8

    @Stephen Bannasch It’ll be solved in a moment (or two). Sorry.

  1. December 31st, 2009 at 00:47 | #1
Improve the web with Nofollow Reciprocity.