IIRC Riak requires a tag and otherwise client libraries just provide "_" (right?)
So probably @robject.to_link should return a "_" in the tag field by default - instead of nil. I'm sorry i have 0 time to provide a patch :( Francisco 2010/6/8 Sean Cribbs <s...@basho.com>: > Francisco, > > Thanks for that, I'll either make it be required or raise an exception. The > Ruby API should better guide you down the golden path - tags are required on > the Riak side, so they should on the Ruby side. > > Sean Cribbs <s...@basho.com> > Developer Advocate > Basho Technologies, Inc. > http://basho.com/ > > On Jun 8, 2010, at 4:48 PM, francisco treacy wrote: > >> The following code yields an exception >> >> item = client['items']['item'] >> catalog = client['catalogs']['test'] >> link = item.to_link >> catalog.links << link >> catalog.store >> >> (...) >> /Users/ftreacy/.rvm/gems/ruby-1.9.1-p378/gems/riak-client-0.7.0/lib/riak/client/curb_backend.rb:63:in >> `perform': Expected [200, 204, 300] from Riak but received 400. >> Invalid Link header. Links must be of the form (Riak::FailedRequest) >> </riak/BUCKET/KEY>; riaktag="TAG" >> from >> /Users/ftreacy/.rvm/gems/ruby-1.9.1-p378/gems/riak-client-0.7.0/lib/riak/client/http_backend.rb:92:in >> `put' >> from >> /Users/ftreacy/.rvm/gems/ruby-1.9.1-p378/gems/riak-client-0.7.0/lib/riak/robject.rb:122:in >> `store' >> >> This is because a 'tag' is not set, but tags shouldn't be required. >> >> (Consider setting link.tag = "something" before line 4, and it will >> work correctly). >> >> Francisco >> >> _______________________________________________ >> riak-users mailing list >> riak-users@lists.basho.com >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com