[redland-dev] ruby bindings
Dave Beckett
dave.beckett at bristol.ac.uk
Wed Aug 3 15:53:32 BST 2005
On Wed, 2005-08-03 at 16:13 +0200, Yann Klis wrote:
> Hi all,
>
> I'm new to rdf (and redlanf) and I'm looking for some simple examples
> with the ruby bindings like:
> - opening a storage
> - creating a model
> - creating a statement
> - add this statement to the model
>
> I'm a little lost at the moment because I try to run the tests and the
> tuby interpreter complains about basic things like:
> "test_model.rb:2:in `require': No such file to load -- rdf/redland
> (LoadError)"
>
> My system is Ubuntu Hoary and I simply install the librdf-ruby package
> from my distribution.
>
> Thanks in advance,
The ones that ship with hoary are ancient and you shouldn't use them.
If you go to http://download.librdf.org/ you'll see instructions how to
get the packages I built for it.
I tried them out in a hoary area I have here (a chroot area, not an
actual hoary install) using the hoary packages above:
$ wget http://www.ilrt.bristol.ac.uk/people/cmdjb/webwho.xrdf
$ mv webwho.xrdf foaf.rdf
$ ruby1.8 /usr/share/doc/librdf-ruby/examples/example.rb file:foaf.rdf
raptor
and you should get a big long list of rdf triples on the output. The
example.rb file contains the sequence of things you ask for early on and
can be used to try out the API.
Also might help - rubydoc http://librdf.org/docs/rdoc/index.html
and more examples in the sources & CVS:
http://cvs.librdf.org/cvsweb/redland/bindings/ruby/test/
Dave
More information about the redland-dev
mailing list