How To Install ruby-grape-entity on Debian 9

In this tutorial we learn how to install ruby-grape-entity on Debian 9. ruby-grape-entity is Entity support to API frameworks, such as Grape

Introduction

In this tutorial we learn how to install ruby-grape-entity on Debian 9.

What is ruby-grape-entity

ruby-grape-entity is:

This library adds Entity support to API frameworks, such as Grape. Grape’s Entity is an API focused facade that sits on top of an object model.

Entities are a reusable means for converting Ruby objects to API responses. Entities can be used to conditionally include fields, nest other entities, and build ever larger responses, using inheritance.

There are three methods to install ruby-grape-entity on Debian 9. 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-grape-entity 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-grape-entity using apt-get by running the following command:

sudo apt-get -y install ruby-grape-entity

Install ruby-grape-entity Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install ruby-grape-entity

Install ruby-grape-entity 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install ruby-grape-entity

How To Uninstall ruby-grape-entity on Debian 9

To uninstall only the ruby-grape-entity package we can use the following command:

sudo apt-get remove ruby-grape-entity

Uninstall ruby-grape-entity And Its Dependencies

To uninstall ruby-grape-entity and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove ruby-grape-entity

Remove ruby-grape-entity Configurations and Data

To remove ruby-grape-entity configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge ruby-grape-entity

Remove ruby-grape-entity configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge ruby-grape-entity

Dependencies

ruby-grape-entity have the following dependencies:

References

Summary

In this tutorial we learn how to install ruby-grape-entity package on Debian 9 using different package management tools: apt, apt-get and aptitude.