seancribbs/ripple — Issue #243: Find throws error when no match is found
Author: morkeleb
Created: 2011-11-20 18:48:41+00:00
State: open

I've tried with excon and curb, both produce the same result. It seems to throw inside the http handling.

I just do User.find('openid_uid'). It finds users if they exist, but if they dont I get the following trace:

undefined method `closed?' for nil:NilClass (NoMethodError)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:1060:in `request'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client/net_http_backend.rb:57:in `perform'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client/net_http_backend.rb:56:in `tap'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client/net_http_backend.rb:56:in `perform'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client/http_backend/transport_methods.rb:44:in `get'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client/http_backend.rb:67:in `fetch_object'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client.rb:270:in `get_object'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client.rb:423:in `recover_from'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client/pool.rb:126:in `take'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client.rb:421:in `recover_from'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client.rb:276:in `http'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client.rb:121:in `backend'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/client.rb:269:in `get_object'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/riak-client/lib/riak/bucket.rb:88:in `get'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/ripple/lib/ripple/document/finders.rb:113:in `find_one'
/Users/morten/.bundler/ruby/1.8/ripple-ea59520612e3/ripple/lib/ripple/document/finders.rb:55:in `find'