How To Install ruby-whitequark-parser on Ubuntu 22.04
Introduction
In this tutorial we learn how to install ruby-whitequark-parser
on Ubuntu 22.04.
What is ruby-whitequark-parser
ruby-whitequark-parser is:
parser is a production-ready Ruby parser written in pure Ruby. It recognizes as much or more code than Ripper, Melbourne, JRubyParser or ruby_parser, and is vastly more convenient to use.
Among its keys features are: it provides precise source location reporting, it has a documented AST format which is convenient to work with, it parses 1.8, 1.9, 2.x, and 3.x syntax with backwards-compatible AST formats, and also parses MacRuby and RubyMotion syntax extensions. It also has improved clang-like diagnostic messages with location information.
It is written in pure Ruby, runs on MRI >= 2.0.0, JRuby and Rubinius, and historically, all versions of Ruby since 1.8. It has excellent test coverage and the source code is readable and well commented.
Not to be confused with ruby_parser gem from Ryan Davis, of seattle.rb Ruby user group.
There are three methods to install ruby-whitequark-parser
on Ubuntu 22.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-whitequark-parser 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-whitequark-parser
using apt-get
by running the following command:
sudo apt-get -y install ruby-whitequark-parser
Install ruby-whitequark-parser Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install ruby-whitequark-parser
using apt
by running the following command:
sudo apt -y install ruby-whitequark-parser
Install ruby-whitequark-parser 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-whitequark-parser
using aptitude
by running the following command:
sudo aptitude -y install ruby-whitequark-parser
How To Uninstall ruby-whitequark-parser on Ubuntu 22.04
To uninstall only the ruby-whitequark-parser
package we can use the following command:
sudo apt-get remove ruby-whitequark-parser
Uninstall ruby-whitequark-parser And Its Dependencies
To uninstall ruby-whitequark-parser
and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove ruby-whitequark-parser
Remove ruby-whitequark-parser Configurations and Data
To remove ruby-whitequark-parser
configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge ruby-whitequark-parser
Remove ruby-whitequark-parser configuration, data, and all of its dependencies
We can use the following command to remove ruby-whitequark-parser
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge ruby-whitequark-parser
References
Summary
In this tutorial we learn how to install ruby-whitequark-parser
package on Ubuntu 22.04 using different package management tools: apt
, apt-get
and aptitude
.