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...
Use
rubygems
to install thehandlersocket
gem in a terminal window, as follows:sudo gem install 'handlersocket'
Launch the
irb
interactive Ruby interpreter and check that thehandlersocket
library loads as follows:irb require 'rubygems' require 'handlersocket...