ldp icon indicating copy to clipboard operation
ldp copied to clipboard

sample code seems to not work

Open markwilkinson opened this issue 7 years ago • 0 comments

Using the sample code as a template for a simple transaction (latest gem):

require 'ldp'
host = 'http://localhost:8890'
client = Ldp::Client.new(host)
resource = Ldp::Resource.new(client, host + 'DAV/home/dba/LDP/container/mydata')
orm = Ldp::Orm.new(resource)
orm.graph.insert([orm.resource.subject_uri, RDF::DC11.title, 'a new title']) # FAIL HERE

/home/markw/.rvm/gems/ruby-2.4.1/gems/ldp-1.0.0/lib/ldp/orm.rb:25:in block in graph': undefined method graph' for #Ldp::Resource:0x000000015c7758 (NoMethodError) from /home/markw/.rvm/gems/ruby-2.4.1/gems/activesupport-5.2.1/lib/active_support/notifications.rb:170:in instrument' from /home/markw/.rvm/gems/ruby-2.4.1/gems/ldp-1.0.0/lib/ldp.rb:41:in instrument' from /home/markw/.rvm/gems/ruby-2.4.1/gems/ldp-1.0.0/lib/ldp/orm.rb:24:in graph' from ldp.rb:12:in

'

markwilkinson avatar Sep 24 '18 12:09 markwilkinson