Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Make it possible to serialise incomplete models #29

njh opened this Issue · 3 comments

2 participants


I am using Spira on to help me serialise models to RDF. However I am having to depend upon version 0.0.5 because version 0.0.6 added a problem to prevents you from serialising a model, if there is no repository configured.

require 'rubygems'
require 'spira'

class Artist
  include Spira::Resource
  base_uri ''
  property :name, :predicate =>, :type => XSD.string
  has_many :age,  :predicate => FOAF.age, :type => XSD.integer

mozart = Artist.for(33163) = 'Wolfgang Amadeus Mozart'
#mozart.age = 35

puts RDF::Writer.for(:ntriples).dump(mozart)

With the setting age line commented out, the following error is thrown:

Artist is configured to use :default as a repository, but it has not been set. (Spira::NoRepositoryError)

Nick, Ben is occupied on another front just now, but would be happy to merge a patch in case you figured out what the problem here is. More than that, he'd be happy to have you as a co-author of Spira if you wanted to take a more active role in pushing the project forward.


I started to have a look at fixing this last night, but encountered further problems. I realised that because is only using Spira to serialise RDF, it was actually easier to use RDF.rb directly to construct a Graph.

If I use Spira for another project I will certain take look at improving it.


This project has moved to ruby-rdf/spira. If this issue is still relevant, please resubmit it over there.

@bendiken bendiken closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.