How To Install ruby-actionpack-page-caching on Ubuntu 18.04

In this tutorial we learn how to install ruby-actionpack-page-caching on Ubuntu 18.04. ruby-actionpack-page-caching is static page caching for Action Pack (removed from core in Rails 4.0)

Introduction

In this tutorial we learn how to install ruby-actionpack-page-caching on Ubuntu 18.04.

What is ruby-actionpack-page-caching

ruby-actionpack-page-caching is:

Page caching is an approach to caching where the entire action output of is stored as a HTML file that the web server can serve without going through Action Pack.

This is the fastest way to cache your content as opposed to going dynamically through the process of generating the content. Unfortunately, this incredible speed-up is only available to stateless pages where all visitors are treated the same. Content management systems – including weblogs and wikis – have many pages that are a great fit for this approach, but account-based systems where people log in and manipulate their own data are often less likely candidates.

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

sudo apt-get -y install ruby-actionpack-page-caching

Install ruby-actionpack-page-caching Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install ruby-actionpack-page-caching using apt by running the following command:

sudo apt -y install ruby-actionpack-page-caching

Install ruby-actionpack-page-caching 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-actionpack-page-caching using aptitude by running the following command:

sudo aptitude -y install ruby-actionpack-page-caching

How To Uninstall ruby-actionpack-page-caching on Ubuntu 18.04

To uninstall only the ruby-actionpack-page-caching package we can use the following command:

sudo apt-get remove ruby-actionpack-page-caching

Uninstall ruby-actionpack-page-caching And Its Dependencies

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

sudo apt-get -y autoremove ruby-actionpack-page-caching

Remove ruby-actionpack-page-caching Configurations and Data

To remove ruby-actionpack-page-caching configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge ruby-actionpack-page-caching

Remove ruby-actionpack-page-caching configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge ruby-actionpack-page-caching

References

Summary

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