Now that you've installed Couchbase and have probably created a cluster of Couchbase servers, it is time to install the client library for Ruby, and start manipulating data.
Here's a quick outline of what you'll learn in this article:
Installing the Ruby Couchbase Client (Gem) Couchbase.
Writing a simple program to demonstrate connecting to Couchbase and saving some data.
Exploring some of the API methods that will take you further than the simple program.
This section assumes that you have installed Couchbase Ruby SDK and you have installed the Couchbase server on your development machine. We assume you have at least one instance of Couchbase Server and one data bucket established. If you need to set up these items in Couchbase Server, you can do with the Couchbase Administrative Console, or Couchbase Command-Line Interface (CLI), or the Couchbase REST-API. For information and instructions, see:
Using the Couchbase Web Console, for information on using the Couchbase Administrative Console,
Couchbase CLI, for the command line interface,
Couchbase REST API, for creating and managing Couchbase resources.
The TCP/IP port allocation on Windows by default includes a restricted number of ports available for client communication. For more information on this issue, including information on how to adjust the configuration and increase the available ports, see MSDN: Avoiding TCP/IP Port Exhaustion.
After you have your Couchbase Server set up and you have installed the Couchbase SDK, you can compile and run the following basic program.