How To Install ruby-turbolinks on Ubuntu 20.04
Introduction
In this tutorial we learn how to install ruby-turbolinks
on Ubuntu 20.04.
What is ruby-turbolinks
ruby-turbolinks is:
Turbolinks makes following links in your Rails web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body and the title in the head. Think CGI vs persistent process.
This is similar to pjax, but instead of worrying about what element on the page to replace, and tailoring the server-side response to fit, the entire body is replaced. This means that you get the bulk of the speed benefits from pjax (no recompiling of the JavaScript or CSS) without having to tailor the server-side response. It just works. Ruby-Versions: all
There are three methods to install ruby-turbolinks
on Ubuntu 20.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-turbolinks 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-turbolinks
using apt-get
by running the following command:
sudo apt-get -y install ruby-turbolinks
Install ruby-turbolinks Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install ruby-turbolinks
using apt
by running the following command:
sudo apt -y install ruby-turbolinks
Install ruby-turbolinks 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-turbolinks
using aptitude
by running the following command:
sudo aptitude -y install ruby-turbolinks
How To Uninstall ruby-turbolinks on Ubuntu 20.04
To uninstall only the ruby-turbolinks
package we can use the following command:
sudo apt-get remove ruby-turbolinks
Uninstall ruby-turbolinks And Its Dependencies
To uninstall ruby-turbolinks
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove ruby-turbolinks
Remove ruby-turbolinks Configurations and Data
To remove ruby-turbolinks
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge ruby-turbolinks
Remove ruby-turbolinks configuration, data, and all of its dependencies
We can use the following command to remove ruby-turbolinks
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge ruby-turbolinks
References
Summary
In this tutorial we learn how to install ruby-turbolinks
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.