connecting to remote Riak from Ruby

Zubair Quraishi zubairq at gmail.com
Tue Feb 16 03:02:44 EST 2010


I have the following buckets in my Riak 0.7.1 database:

{ok,[<<"default">>,<<"__riak_
client_test__">>]}

so I perform on the default bucket too:

>> bucket = client["default"]

Riak::FailedRequest: Expected 200 from Riak but received 404.
<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD><BODY><H1>Not Found</H1>The
requested document was not found on this
server.<P><HR><ADDRESS>mochiweb+webmachine web
server</ADDRESS></BODY></HTML>
    from
/Library/Ruby/Gems/1.8/gems/ripple-0.5.0/lib/riak/client/curb_backend.rb:58:in
`perform'
    from
/Library/Ruby/Gems/1.8/gems/ripple-0.5.0/lib/riak/client/http_backend.rb:71:in
`get'
    from /Library/Ruby/Gems/1.8/gems/ripple-0.5.0/lib/riak/client.rb:119:in
`[]'
    from (irb):14
>>


On Tue, Feb 16, 2010 at 12:09 AM, Sean Cribbs <seancribbs at gmail.com> wrote:

>  Obviously the object is not there.  If you want to create a new object,
> get the bucket first and create an empty RObject:
>
> bucket = client['bucket_name']
> object = Riak::RObject.new(bucket, "key")
>
> I'll be working on making this easier to do, but it will come after I've
> completed the ORM features.
>
> Sean
>
> On 2/15/10 3:08 PM, Zubair Quraishi wrote:
>
> I get :
>
> Riak::FailedRequest: Expected 200 from Riak but received 404.
> <HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD><BODY><H1>Not Found</H1>The
> requested document was not found on this
> server.<P><HR><ADDRESS>mochiweb+webmachine web
> server</ADDRESS></BODY></HTML>
>
>
> Is this because I am using Riak server 0.7.1?
>
>
>
> On Mon, Feb 15, 2010 at 6:43 PM, Sean Cribbs <seancribbs at gmail.com> wrote:
>
>>  Zubair,
>>
>> Specify the :host option when initializing the client.  e.g.:
>>
>> client = Riak::Client.new(:host => "some.domain.name")
>>
>> If you're using the Ripple::Document mixin:
>>
>> Ripple.config = {:host => "some.domain.name"}
>>
>> Sean
>>
>>
>> On 2/15/10 12:04 PM, Zubair Quraishi wrote:
>>
>> Does anyone know how to connect to a remote Riak node via Ruby? I tried
>> ripple but it does not seem to document how to do this.
>>
>>
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.comhttp://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20100216/f67fe369/attachment.html>


More information about the riak-users mailing list