ruby-parse command not found

In this troubleshooting guide we learn how to fix ruby-parse command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

ruby-parse: command not found

or when using sudo you get the following error message

sudo: ruby-parse: command not found

Solutions to ruby-parse: command not found

How To Fix ruby-parse: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ruby-parse is provided by ruby-whitequark-parser package.

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.

To fix this problem, we can install more using the command below.

sudo apt-get -y install ruby-whitequark-parser

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install ruby-whitequark-parser.

sudo apt -y install ruby-whitequark-parser

Or if you have aptitude installed you can use the following command.

sudo aptitude install ruby-whitequark-parser

Summary

In this tutorial we learn how to fix ruby-parse command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.