ruby-rdf / rdf-rdfa

Ruby RDFa reader/writer for RDF.rb.
http://ruby-rdf.github.com/rdf-rdfa
The Unlicense
35 stars 11 forks source link

Example doesn't work with installed gem #3

Closed chrislo closed 14 years ago

chrislo commented 14 years ago

Hi,

Trying out the example in the distribution, if I install using ruby gems and run the example file from the repository it works as expected. If however, I remove the line

$:.unshift(File.join(File.dirname(FILE), 'lib'))

from the example, it doesn't work. (each_statement not defined for nil error). I suspect that there's something amiss with the setting up of paths in the gem, but I can't work out what it is.

Cheers,

Chris

gkellogg commented 14 years ago

I just checked in version 0.0.3, which fixes the problem. Not exactly sure why it wasn't working properly before.

This version moves all the logic to each_statement/each_triple, rather than initialize. This also avoids having to create an internal graph to store triples.

chrislo commented 14 years ago

0.0.3 works well for me now, thank you!