Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.5
    • Component/s: None
    • Security Level: Public
    • Labels:
      None

      Description

      For a design document "dev_catalog" and view "catalog_view" error
      "undefined method views" is generated.
      "undefined method catalog_view" is also generated.

      ddoc = client.design_docs["dev_catalog"]
      ddoc.views
      ddoc.catalog_view.each do |row|
      puts row.key
      puts row.value
      puts row.id
      puts row.doc
      end

      The ruby client version is 1.3.4

      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 -

        development views are visible only in development environment. In current release there is issue with setting environment. I've fixed it in this patch http://review.couchbase.org/32318

        Meanwhile, you can use this simple workaround to query development views

        require 'couchbase'

        class Couchbase::Bucket
        alias old_initialize initialize
        def initialize(*args)
        options = args.last
        if options.is_a?(Hash) && options[:environment]
        self.class.send(:define_method, :environment) do
        return options[:environment]
        end
        end
        old_initialize(*args)
        end
        end

        client = Couchbase::Bucket.new(:environment => :development)
        puts client.design_docs.inspect

        Show
        avsej Sergey Avseyev added a comment - development views are visible only in development environment. In current release there is issue with setting environment. I've fixed it in this patch http://review.couchbase.org/32318 Meanwhile, you can use this simple workaround to query development views require 'couchbase' class Couchbase::Bucket alias old_initialize initialize def initialize(*args) options = args.last if options.is_a?(Hash) && options [:environment] self.class.send(:define_method, :environment) do return options [:environment] end end old_initialize(*args) end end client = Couchbase::Bucket.new(:environment => :development) puts client.design_docs.inspect
        Hide
        dvohra deepak vohra added a comment -

        Would the issue be fixed in next version or release? Thanks Sergey.

        Show
        dvohra deepak vohra added a comment - Would the issue be fixed in next version or release? Thanks Sergey.
        Hide
        avsej Sergey Avseyev added a comment -

        yeah. it is on master branch already. and will be released in the first days of february

        Show
        avsej Sergey Avseyev added a comment - yeah. it is on master branch already. and will be released in the first days of february
        Show
        avsej Sergey Avseyev added a comment - https://github.com/couchbase/couchbase-ruby-client/commit/43cd9de7b9cd2c32ed7edd2c1ddc281b08bda198
        Hide
        dvohra deepak vohra added a comment -

        Thanks Sergey.

        Show
        dvohra deepak vohra added a comment - Thanks Sergey.

          People

          • Assignee:
            avsej Sergey Avseyev
            Reporter:
            dvohra deepak vohra
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes