Getting Riak to work

Chris Hicks silent_vendetta at
Sat May 15 01:56:17 EDT 2010

Alright, so I've worked my way through a few hurdles in getting this thing to work properly but I've hit a spot where I don't know what to try next. keep in mind that I am learning both Erlang and Riak at the same time, or at least trying to.

Connecting works just fine:

{ok, Pid} = riak:client_connect('riak at').
{ok,{riak_client,'riak at',<<2,232,152,157>>}}

Trying to create a new riak object does not go as smoothly:

Object = riakc_obj:new(<<"groceries">>, <<"mine">>, <<"eggs & bacon">>).
** exception error: undefined function riakc_obj:new/3

The module can be found, however, so I know I set up the code paths right:


The function new/4 works just fine though:

Object = riakc_obj:new(<<"groceries">>, <<"mine">>, <<"eggs & bacon">>, []).
{riakc_obj,<<"groceries">>,<<"mine">>,<<"eggs & bacon">>,[],

I've tried two different ways to put that object into the DB and both failed as shown below:

Pid:put(Object, 1).
** exception error: no function clause matching 
                                                  <<"eggs & bacon">>,[],
     in function  riak_client:put/5


riak_client:put(Object, 1, 1).
** exception error: no function clause matching 
                                        <<"eggs & bacon">>,[],

The above method also fails if I try the put/4 method with the same error message .

I'm looking in the source code here: and based on what I can see I can't explain why I am getting the errors I am, with put or with creating a new object. I might just be too tired at the moment to figure it out but it is driving me crazy and any help would be appreciated.

The New Busy is not the old busy. Search, chat and e-mail from your inbox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list