How To Install ruby-thinking-sphinx on Ubuntu 18.04

In this tutorial we learn how to install ruby-thinking-sphinx on Ubuntu 18.04. ruby-thinking-sphinx is smart wrapper over sphinx for activerecord

Introduction

In this tutorial we learn how to install ruby-thinking-sphinx on Ubuntu 18.04.

What is ruby-thinking-sphinx

ruby-thinking-sphinx is:

Thinking Sphinx is a library for connecting ActiveRecord to the Sphinx full-text search tool, and integrates closely with Rails (but also works with other Ruby web frameworks).

There are three methods to install ruby-thinking-sphinx on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install ruby-thinking-sphinx Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install ruby-thinking-sphinx using apt-get by running the following command:

sudo apt-get -y install ruby-thinking-sphinx

Install ruby-thinking-sphinx Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install ruby-thinking-sphinx using apt by running the following command:

sudo apt -y install ruby-thinking-sphinx

Install ruby-thinking-sphinx Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install ruby-thinking-sphinx using aptitude by running the following command:

sudo aptitude -y install ruby-thinking-sphinx

How To Uninstall ruby-thinking-sphinx on Ubuntu 18.04

To uninstall only the ruby-thinking-sphinx package we can use the following command:

sudo apt-get remove ruby-thinking-sphinx

Uninstall ruby-thinking-sphinx And Its Dependencies

To uninstall ruby-thinking-sphinx and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove ruby-thinking-sphinx

Remove ruby-thinking-sphinx Configurations and Data

To remove ruby-thinking-sphinx configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge ruby-thinking-sphinx

Remove ruby-thinking-sphinx configuration, data, and all of its dependencies

We can use the following command to remove ruby-thinking-sphinx configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge ruby-thinking-sphinx

References

Summary

In this tutorial we learn how to install ruby-thinking-sphinx package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.