Book Image

MariaDB Cookbook

By : Daniel Bartholomew
Book Image

MariaDB Cookbook

By: Daniel Bartholomew

Overview of this book

Table of Contents (20 chapters)
MariaDB Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Installing the HandlerSocket Ruby client libraries


Ruby is the last language in our trio of scripting languages compatible with HandlerSocket in this chapter. Installing and using this library is easy.

Getting ready

Install the libhsclient library as described in the Installing the libhsclient library recipe earlier in this chapter. In order to build the HandlerSocket Ruby client libraries, we need to install some development tools and packages.

On Red Hat, Fedora, or CentOS, run the following command:

sudo yum install ruby-irb rubygems ruby-rdoc ruby-devel

On Debian or Ubuntu, run the following command:

sudo apt-get install irb rubygems rdoc ruby-dev

We are now ready to install the HandlerSocket Ruby client libraries.

How to do it...

  1. Use rubygems to install the handlersocket gem in a terminal window, as follows:

    sudo gem install 'handlersocket'
    
  2. Launch the irb interactive Ruby interpreter and check that the handlersocket library loads as follows:

    irb
    require 'rubygems'
    require 'handlersocket...