
MariaDB Cookbook
By :

Ruby is the last language in our trio of scripting languages compatible with HandlerSocket in this chapter. Installing and using this library is easy.
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.
Use rubygems
to install the handlersocket
gem in a terminal window, as follows:
sudo gem install 'handlersocket'
Launch the irb
interactive Ruby interpreter and check that the handlersocket
library loads as follows:
irb require 'rubygems' require 'handlersocket...
Change the font size
Change margin width
Change background colour