Jena Ruby Setup
is an Open Source Java
for building Semantic Web
It provides access to
and various triplestores
It also includes a rule-based inference engine
and various forms of extensibility
(eg, magic predicates, virtual triplestores).
Obviously, Jena is a worthwhile tool to have around.
Unfortunately, there is that pesky word "Java",
found in the description of so many Semantic Web tools.
Might there be a way for Rubyists to take advantage of Jena,
while staying in their "happy place"?
Indeed, there are...
If all you need to do is process SPARQL queries,
(and Jena) may be all you need.
Your Ruby app can generate the queries,
pass them to Joseki, then process the results.
In this usage, Jena and Joseki act as an HTTP-based, non-relational
) data store.
However, although SPARQL is a convenient query language,
it can only be used for a limited set of tasks.
In order to perform procedural graph traversals,
let alone extend the framework,
you'll need to make calls to Jena methods.
provides an easy way to do this.
If you don't already have Java, Jena, and (if desired) Joseki installed,
you'll have to do this before continuing here.
You can find installation notes for these tools in
"Semantic Web Programming" - Setup notes
As you'll see, the notes allow you to add several other tools
(eg, Eclipse, Graphviz, Pellet, Protege).
These tools aren't strictly needed in order to use Jena,
but are probably worthwhile to install if you have the time and space.
Installation details tend to vary across operating systems,
So I'm breaking that out onto separate pages.
I've created Mac OS X
submissions for other systems would be most welcome!
Taylor Cowan, author of the JenaBean
provided me with an excellent jump start on this topic.
See his blog entry,
"Jena Ruby bindings: accessing Jena’s feature-rich RDF API from Ruby"
for more information.
This wiki page is maintained by Rich Morin
an independent consultant specializing in software design, development, and documentation.
Please feel free to email
comments, inquiries, suggestions, etc!