How To Install ruby-validate-url on Ubuntu 18.04

In this tutorial we learn how to install ruby-validate-url on Ubuntu 18.04. ruby-validate-url is Library for validating urls in Rails

Introduction

In this tutorial we learn how to install ruby-validate-url on Ubuntu 18.04.

What is ruby-validate-url

ruby-validate-url is:

ruby-validate-url gem adds the capability of validating URLs to ActiveRecord(a framework to work with databases on Rails) and ActiveModel(a toolkit for building modeling frameworks) (Rails 3).

There are three methods to install ruby-validate-url 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-validate-url 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-validate-url using apt-get by running the following command:

sudo apt-get -y install ruby-validate-url

Install ruby-validate-url Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install ruby-validate-url

Install ruby-validate-url 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-validate-url using aptitude by running the following command:

sudo aptitude -y install ruby-validate-url

How To Uninstall ruby-validate-url on Ubuntu 18.04

To uninstall only the ruby-validate-url package we can use the following command:

sudo apt-get remove ruby-validate-url

Uninstall ruby-validate-url And Its Dependencies

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

sudo apt-get -y autoremove ruby-validate-url

Remove ruby-validate-url Configurations and Data

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

sudo apt-get -y purge ruby-validate-url

Remove ruby-validate-url configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge ruby-validate-url

References

Summary

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