Saturday, February 19, 2005

Subversion + Ruby + SWIG = Fun!

So thanks to the work of Kouhei Sutou we now have a set of SWIG based Subversion bindings for Ruby. They're currently living on a branch in the Subversion repository, and I've been meaning to get around to trying them out for a while now.

My first attempt resulted in a bit of a failure due to the fact that the version of Ruby I got with my Ubuntu linux install seems to fail to expose the symbol rb_hash_foreach from libruby1.8.so, so whenever I tried to run the tests I'd get failures due to relocation errors when it tried to use that function.

I have no clue why that symbol isn't being exposed (if anyone does have an idea, please let me know, cause it's a pain in the ass), but once I built my own version of Ruby (to go along with my own version of SWIG since Ubuntu's version of SWIG has bugs that keep it from working for the Subversion Ruby bindings) everything went along swimmingly.

It's quite nice to have a set of reasonably complete Subversion bindings for such a cool language. All they need is a little documentation and I suspect they'll be just as functional as the excellent Perl bindings we've had for some time.

2 comments:

  1. Check out http://blog.leetsoft.com/articles/read/8 about debian's ruby packaging.

    ReplyDelete
  2. Is there any documentation around on using the SVN bindings besides the rdoc? I guess I just need a couple of samples or a short tutorial, because looking at the classes and methods without knowing where to start from is quite intimidating.

    ReplyDelete