Full Installation

    Installation instructions for the Couchbase Ruby Client.

    Prerequisites

    Ruby SDK supports MRI Ruby versions 4.0, 3.4, and 3.3.

    Installing the SDK

    The source package is available through https://rubygems.org/gems/couchbase and can be installed with:

    gem install couchbase

    Note that --pre is necessary when the SDK in Beta/Preview phase — gem install --pre couchbase — otherwise the latest stable release will be installed.

    In addition to rubygems.org, we also maintain official gem repositories, where we publish not only source version of the package, but also precompiled binaries for Linux and MacOS.

    To use official repository, it have to be registered in the .gemrc file:

    gem sources --add https://packages.couchbase.com/clients/ruby/

    The repository could be also specified in Gemfile for bundler. And in this case the source would be applied only for Couchbase SDK library:

    gem "couchbase", "3.9.0", :source => "https://packages.couchbase.com/clients/ruby/"

    Or run in terminal:

    gem install couchbase --clear-sources --source https://packages.couchbase.com/clients/ruby/

    And finally, it is possible to download the package and install from the file. In the notes below, we specify tables with links to every release package along with precompiled binaries.

    wget https://packages.couchbase.com/clients/ruby/sdk-3.9.0/couchbase-3.9.0-x86_64-linux.gem
    gem install couchbase-3.9.0-x86_64-linux.gem

    The URL structure is:

    https://packages.couchbase.com/clients/ruby/sdk-3.9.0/couchbase-3.9.0-%{platform}.gem

    where "platform" placeholder can take values: arm64-darwin, x86_64-darwin, x86_64-linux, x86_64-linux-musl. To see platform string the following command:

    ruby -rrbconfig -e 'puts RbConfig::CONFIG["platform"]'