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 (some tests require test/unit.rb - ships with ruby 1.8.0+) make check
To install it system wide do this as root (or maybe via sudo make install):
root# make install
The Ruby interface was written and is maintained by Dominic Sisneros at the rdf-redland project on RubyForge. The documents and files here may be superceeded or updated by the files at the RubyForge project, check there for the latest versions.
The Ruby interface has been tested with Ruby 1.8.2, 1.8.1, 1.8. The minimum version is likely 1.8 although older ones may work.
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 syntax name (say, rdfxml):
# If installed ruby example.ruby file:../data/dc.rdf rdfxml # In source tree ruby -I. -Ilib example.ruby file:../data/dc.rdf rdfxml
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.
Copyright 2002-2004 Dave Beckett, Institute for Learning and Research Technology, University of Bristol