Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created January 21, 2009 19:21
Show Gist options
  • Save bryanl/50130 to your computer and use it in GitHub Desktop.
Save bryanl/50130 to your computer and use it in GitHub Desktop.
>> CouchRest.get("http://localhost:5984/snort-playground/_design/snort")
=> {"language"=>"javascript", "_rev"=>"137402253", "_id"=>"_design/snort", "views"=>{"signature_revision"=>{"map"=>"function(doc) {\n if (doc['couchrest-type'] == 'Rule') {\n emit(doc._id, [doc.signature, doc.revision, doc.category, doc._id, doc._rev])\n\n }\n }\n"}}}
>> db.info
=> {"purge_seq"=>0, "doc_count"=>13841, "instance_start_time"=>"1232500553332698", "update_seq"=>16560, "disk_size"=>23829352, "compact_running"=>false, "db_name"=>"snort-playground", "doc_del_count"=>1356}
>> db.get("_design/snort")
URI::InvalidURIError: path conflicts with opaque
from /opt/local/lib/ruby/1.8/uri/generic.rb:469:in `check_path'
from /opt/local/lib/ruby/1.8/uri/generic.rb:495:in `path='
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/rest-client-0.8/lib/rest_client.rb:197:in `process_result'
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/rest-client-0.8/lib/rest_client.rb:177:in `transmit'
from /opt/local/lib/ruby/1.8/net/http.rb:543:in `start'
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/rest-client-0.8/lib/rest_client.rb:174:in `transmit'
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/rest-client-0.8/lib/rest_client.rb:114:in `execute_inner'
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/rest-client-0.8/lib/rest_client.rb:106:in `execute'
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/rest-client-0.8/lib/rest_client.rb:93:in `execute'
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/rest-client-0.8/lib/rest_client.rb:47:in `get'
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/couchrest-0.9.12/lib/couchrest.rb:99:in `get'
from /Users/bryan/Development/sourcefire/rulesapi/vendor/gems/couchrest-0.9.12/lib/couchrest/core/database.rb:73:in `get'
from (irb):13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment