# Redland RDF Application Framework - Ruby Interface

## Installing the Redland Ruby interface

This is built if `--with-ruby` is given to the configure line, or `--with-ruby=ruby1.8` to use a particular Ruby version/program. The standard 'make' at the top level will build it.

You can also compile the Ruby interface by hand as follows:

      cd ruby
      make

      # optional, but it may require a top-level 'make install
      # first depending on the operating system and how it
      # handles shared libraries
      make check

To install it system wide do this as root (or maybe via sudo make install):

      root# make install

The Ruby interface has been tested with Ruby 1.8, 1.6.8, 1.6.7 and 1.6.4 and is alpha quality - it is a bare API and may change a lot. Thanks to Dan Brickley for his Ruby help in getting this first version working.

## Redland Ruby API Introduction

The Ruby API is an object-based API with the class names and method names flattened into Ruby procedure names like this: librdf_class_method - the same names as in the underlying C API. The object references become Ruby variables.

## Testing the Redland Ruby interface

The example program provided parses an RDF/XML source file into a model. It should be run with two arguments - the URI of the content (as `file:`/path/to/content) and the parser name (say, raptor):

       ruby example.ruby file:../perl/dc.rdf raptor

## Other RDF Ruby APIs and applications

- Liber resource cataloging application by Brandt Kurowski including a parser, model, web framework and user interface.
- RubyRDF and RubyRDF database by Dan Brickley

Copyright 2002-2004 Dave Beckett, Institute for Learning and Research Technology, University of Bristol