Reputation: 171
Some public methods are working like count() and some I get "freeze" error
gem 'rdf', '=0.3.11.1' require 'rdf' require 'rdf/sesame' require 'rdf/ntriples'
url = RDF::URI("http://localhost:8080/openrdf-sesame")
conn = RDF::Sesame::Connection.open(url)
#server.each_repository do |repository|
# puts repository.inspect
#end
repo = RDF::Sesame::Repository.new("http://localhost:8080/openrdf-sesame/repositories/TEST")
repo.clear_statements() # does not work
puts repo.count() # gives the number of statements in the repository
May someone has a hint as I am not familiar with ruby programming.
Part of the error message: (the other error I get is the NoMethodError which comes from wrong usage of protected methods I guess)
/home/USER/.rvm/gems/ruby-2.1.2/gems/addressable-2.3.6/lib/addressable/uri.rb:1658:in `normalized_fragment': can't modify frozen Addressable::URI (RuntimeError)
from /home/USER/.rvm/gems/ruby-2.1.2/gems/addressable-2.3.6/lib/addressable/uri.rb:823:in `freeze'
from /home/USER/.rvm/gems/ruby-2.1.2/gems/rdf-0.3.11.1/lib/rdf/model/uri.rb:475:in `freeze'
Upvotes: 2
Views: 98
Reputation: 80
The problem is caused through a newer version of addressable!
When I add in the header:
gem 'addressable', '~> 2.2.6'
require 'addressable/uri'
I don't get the Error anymore! Version 2.2.6 or newer is required for rdf-sesame!
Upvotes: 3