Re: Newbie Ripple

2011-06-22 Thread Pablo Chacin
Thanks for your answers. I now have clear how to configure Ripple. Regarding the other two questions, It looks like I should take a closer look at the Risky framework as it seems to offer more control on how the mapping is done. Regards. ___ riak-users m

Re: Newbie Ripple

2011-06-21 Thread Aphyr
2. You could write x = Klass.find(key) if x.nil? x = Klass.new x.save end get_or_new doesn't save, so perhaps Klass.find(key) || Klass.new(key) Risky (another Ruby Riak model layer) offers Klass.get_or_new(key) 3. control the bucket on which the document is stored/retri

Re: Newbie Ripple

2011-06-21 Thread Thomas Fee
1. The configuration for Ripple goes like this... require 'ripple' Ripple.client.host = 'hostname-or-ip-address' 2. You could write x = Klass.find(key) if x.nil? x = Klass.new x.save end Unless you meant that you need an atomic read-or-create operation. I don't know if such a th

Re: Newbie Ripple

2011-06-21 Thread Jeremiah Peschka
Hi Pablo, welcome! In answer to question 1: I put together an introduction to Riak a while back, you can find it on github: https://github.com/peschkaj/riak_intro/ Specifically, https://github.com/peschkaj/riak_intro/blob/master/src/mr_filter.rb has an example of how to configure get Riak up and

Newbie Ripple

2011-06-21 Thread Pablo Chacin
Hello I'm new to reply and Ruby in general, so probably my questions have evident answers. I'm trying to use the Document Model, but there are a few things that are not clear from the documentation: 1. How to configure ripple when used in a ruby (not rails) application. 2. I want to do something s