Uploaded image for project: 'Couchbase Ruby client library'
  1. Couchbase Ruby client library
  2. RCBC-32

client.design_docs['docName'] returns empty hash

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.2.0.dp
    • Fix Version/s: None
    • Component/s: library
    • Security Level: Public
    • Labels:
      None

      Description

      I got this report from a user:

      The ruby client does not work as api describes, using couchbase gem 1.2.0.dp:

      view = client.design_docs['docName'].viewName(params)

      where docName, viewName and params are correctly substituted does not work for us, in fact client.design_docs['docName'] always return an empty hash for us.

      The other approach does work however

      view = Couchbase::View.new(client, "_design/docName/_view/viewName", params)

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        avsej Sergey Avseyev added a comment -

        What does return following code?

        client.all_docs(:startkey => "_design/", :endkey => "_design0")

        design_docs uses this query internally and filters the results. The name matters, it must not begin with 'dev_' https://github.com/couchbase/couchbase-ruby-client/blob/master/lib/couchbase/bucket.rb#L74

        If you are going to use 'dev_' prefix, you should specify ':environment => :development' option when you are creating the connection

        Show
        avsej Sergey Avseyev added a comment - What does return following code? client.all_docs(:startkey => "_design/", :endkey => "_design0") design_docs uses this query internally and filters the results. The name matters, it must not begin with 'dev_' https://github.com/couchbase/couchbase-ruby-client/blob/master/lib/couchbase/bucket.rb#L74 If you are going to use 'dev_' prefix, you should specify ':environment => :development' option when you are creating the connection
        Hide
        avsej Sergey Avseyev added a comment -

        Hi Tim, could you verify the issue with latest couchbase gem (1.2.0.dp4) and libcouchbase (1.1.0dp5)?

        Show
        avsej Sergey Avseyev added a comment - Hi Tim, could you verify the issue with latest couchbase gem (1.2.0.dp4) and libcouchbase (1.1.0dp5)?

          People

          • Assignee:
            avsej Sergey Avseyev
            Reporter:
            TimSmith Tim Smith (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes