Hi Norman, I'm not sure why riakc_pb_socket was available when starting Erlang home directory. The only possibility I can think of is maybe you ran "./rebar install" from the riakc directory. The "./rebar install" command will install an application to your Erlang system libs which means the application will be available anytime you start "erl".
On Sat, May 1, 2010 at 2:06 PM, Norman Khine <nor...@khine.net> wrote: > hi dan, ok i got it to work, but i am a little confused. > > here is my procedure: > araweelo:~ khinester$ cd ~/ > araweelo:~ khinester$ riak start > araweelo:~ khinester$ erl -pa ebin/ deps/*/ebin > Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:2:2] [rq:2] > [async-threads:0] [hipe] [kernel-poll:false] > > Eshell V5.7.5 (abort with ^G) > 1> {ok, RiakcSocket} = riakc_pb_socket:start_link({127,0,0,1}, 8087). > {ok,<0.34.0>} > 2> q(). > ok > 3> araweelo:~ khinester$ > > On Sat, May 1, 2010 at 8:48 PM, Dan Reverri <reve...@gmail.com> wrote: > > Hi Norman, > > The documentation is incorrect. Here is a quick session I just ran to use > > riakc: > > [~/Projects/riakc]$ erl -pa ebin/ deps/*/ebin > > as i executed the above code in my home directory, how did erlang know > how to link the ebin and deps/*/ebin? > is it because i have setup in my .profile > > # webmachine erlang files > export PATH=$HOME/Sandboxes/webmachine-read-only/ebin:$PATH > # Erlang and Riak > export PATH=$HOME/Sandboxes/riak/rel/riak/bin:$PATH > export RIAKC=$HOME/Sandboxes/riak/client_lib/riak-erlang-client > > sorry for the noob questions. > > thanks > > > Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:2:2] [rq:2] > > [async-threads:0] [hipe] [kernel-poll:false] > > Eshell V5.7.5 (abort with ^G) > > 1> {ok, RiakcSocket} = riakc_pb_socket:start_link({127,0,0,1}, 8087). > > {ok,<0.34.0>} > > 2> O = riakc_obj:new(<<"bucket">>, <<"key">>, <<"Hello World">>, > > "text/plain"). > > {riakc_obj,<<"bucket">>,<<"key">>,undefined,undefined, > > {dict,1,16,16,8,80,48, > > {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],...}, > > > > {{[],[],[],[],[],[],[],[],[],[],[[<<...>>|...]],[],[],...}}}, > > <<"Hello World">>} > > 3> O = riakc_obj:new(<<"bucket">>, <<"key">>, <<"Hello World">>, > > "text/plain"). > > {riakc_obj,<<"bucket">>,<<"key">>,undefined,undefined, > > {dict,1,16,16,8,80,48, > > {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],...}, > > > > {{[],[],[],[],[],[],[],[],[],[],[[<<...>>|...]],[],[],...}}}, > > <<"Hello World">>} > > 4> riakc_pb_socket:put(RiakcSocket, O, [return_body]). > > {ok,{riakc_obj,<<"bucket">>,<<"key">>, > > <<107,206,97,96,96,96,204,96,202,5,82,44,108,223,42,215, > > 101,48,37,50,230,177,50,...>>, > > [{{dict,3,16,16,8,80,48, > > {[],[],[],[],[],[],[],[],[],[],[],[],...}, > > {{[],[],[],[],[],[],[],[],[],[],...}}}, > > <<"Hello World">>}], > > {dict,0,16,16,8,80,48, > > {[],[],[],[],[],[],[],[],[],[],[],[],[],...}, > > {{[],[],[],[],[],[],[],[],[],[],[],...}}}, > > undefined}} > > 5> > > > > You'll notice I had to include "ebin" and "deps/*/ebin". The deps ebin > was > > necessary for the protobuffs dependency. You'll also notice I didn't > > reference the client at all. > > Thanks, > > Dan > > On Sat, May 1, 2010 at 4:20 AM, Norman Khine <nor...@khine.net> wrote: > >> > >> hi > >> > >> On Sat, May 1, 2010 at 12:30 AM, Dan Reverri <reve...@gmail.com> wrote: > >> > Can you try running "make clean && make all"? > >> > >> yes i did this but still unable to link the library to Erlang? > >> > >> araweelo:riak khinester$ erl -version > >> Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 5.7.5 > >> araweelo:~ khinester$ erl -pa $RIAKC/ebinErlang R13B04 (erts-5.7.5) > >> [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe] > >> [kernel-poll:false] > >> > >> Eshell V5.7.5 (abort with ^G) > >> 1> code:which(riakc_pb_client). > >> non_existing > >> 2> > >> > >> > >> > It should fetch the protobuffs dependency and compile everything. Once > >> > this > >> > is complete run: > >> > erl -pa $RIAKC/ebin > >> > Make sure $RIAKC points to the path where you have cloned the > >> > riak-erlang-client repo. > >> > >> araweelo:riak khinester$ echo $RIAKC > >> /Users/khinester/Sandboxes/riak/client_lib/riak-erlang-client > >> araweelo:riak khinester$ tree -L 2 > >> /Users/khinester/Sandboxes/riak/client_lib/riak-erlang-client/ > >> /Users/khinester/Sandboxes/riak/client_lib/riak-erlang-client/ > >> |-- LICENSE > >> |-- Makefile > >> |-- README > >> |-- deps > >> | `-- protobuffs > >> |-- docs > >> | `-- pb-client.txt > >> |-- ebin > >> | |-- riakc.app > >> | |-- riakc_obj.beam > >> | |-- riakc_pb.beam > >> | |-- riakc_pb_socket.beam > >> | `-- riakclient_pb.beam > >> |-- include > >> | |-- riakc_obj.hrl > >> | |-- riakc_pb.hrl > >> | `-- riakclient_pb.hrl > >> |-- rebar > >> |-- rebar.config > >> `-- src > >> |-- riakc_obj.erl > >> |-- riakc_pb.erl > >> |-- riakc_pb_socket.erl > >> `-- riakclient.proto > >> > >> 6 directories, 18 files > >> > >> > > >> > > >> > On Fri, Apr 30, 2010 at 2:16 PM, Norman Khine <nor...@khine.net> > wrote: > >> >> > >> >> hello, > >> >> i am following the > >> >> riak/client_lib/riak-erlang-client/docs/pb-client.txt > >> >> but am stuck on this point: > >> >> > >> >> $ erl -pa $RIAKC/ebin > >> >> Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:2:2] [rq:2] > >> >> [async-threads:0] [hipe] [kernel-poll:false] > >> >> > >> >> Eshell V5.7.5 (abort with ^G) > >> >> 1> code:which(riakc_pb_client). > >> >> non_existing > >> >> 2> > >> >> User switch command > >> >> --> q > >> >> > >> >> i also tried: > >> >> > >> >> $ sudo ./rebar install > >> >> Password: > >> >> ==> protobuffs (install) > >> >> Installing: protobuffs-4 to /opt/local/lib/erlang/lib > >> >> ==> riak-erlang-client (install) > >> >> Installing: riakc-1 to /opt/local/lib/erlang/lib > >> >> aqoon:riak-erlang-client khinester$ erl > >> >> Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:2:2] [rq:2] > >> >> [async-threads:0] [hipe] [kernel-poll:false] > >> >> > >> >> Eshell V5.7.5 (abort with ^G) > >> >> 1> code:which(riakc_pb_client). > >> >> non_existing > >> >> 2> > >> >> > >> >> how do i link the client correctly? > >> >> any help much appreciated > >> >> > >> >> norman > >> >> > >> >> -- > >> >> ¿noʎ uɐɔ uʍop ǝpısdn ǝʇıɹʍ uɐɔ ı - %>>> "".join( [ > >> >> {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in > >> >> ",adym,*)&uzq^zqf" ] ) > >> >> > >> >> _______________________________________________ > >> >> riak-users mailing list > >> >> riak-users@lists.basho.com > >> >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > >> > > >> > > >> > > >> > >> > >> > >> -- > >> ¿noʎ uɐɔ uʍop ǝpısdn ǝʇıɹʍ uɐɔ ı - %>>> "".join( [ > >> {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in > >> ",adym,*)&uzq^zqf" ] ) > > > > > > > > -- > ¿noʎ uɐɔ uʍop ǝpısdn ǝʇıɹʍ uɐɔ ı - %>>> "".join( [ > {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in > ",adym,*)&uzq^zqf" ] ) >
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com