Skip to content

sample code seems to not work #104

@markwilkinson

Description

@markwilkinson

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

'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions