I have spent a few hours setting up, running and then digging into the riak ruby client, this was based on message posted by @seancribbs inviting people to assist in debugging some issues he was having with "intermittent failure around the generated node not starting".
On investigation of the issues, and a read over the code in general I came across a couple of things I would fix first.
In both of the following instances I would rewrite the process management code which executes riak and riak-admin tools. Currently it is not consistent in it's checking response codes or error output, this in my view is bad.
- https://github.com/basho/riak-ruby-client/blob/master/lib/riak/node/control.rb#L185
- https://github.com/basho/riak-ruby-client/blob/master/lib/riak/node/control.rb#L190
Currently this method of "managing" the riak node during the integration test cycle runs approx 400 shell commands, many of which are unnecessary in this case. This isn't in itself a bad thing, however this paired with the process management highlighted above don't really lend themselves to establishing a very robust method for managing riak nodes.
In short the process of starting and stopping a node seems overly complicated given it aims to simply start a memory based riak instance.
Shelling out to the control scripts, which then do "stuff" and may or may not then spawn the erlang VM should be carefully monitored, especially with so many things going on behind them.
Probaly best to restructure the existing code which runs the riak commands to provide better checking of status codes, and STDERR.
Alternatively you could build a ruby API which does the same thing as a bonus removing this layer would enable better error reporting, and much greater control on what is run.
I would recommend having a look at Working with Unix processes.