parallel_rspec command not found

In this troubleshooting guide we learn how to fix parallel_rspec command not found error message

Introduction

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

parallel_rspec: command not found

or when using sudo you get the following error message

sudo: parallel_rspec: command not found

Solutions to parallel_rspec: command not found

How To Fix parallel_rspec: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu parallel_rspec is provided by ruby-parallel-tests package.

ruby-parallel-tests is:

Speedup Test::Unit + RSpec + Cucumber + Spinach by running parallel on multiple CPU cores. ParallelTests splits tests into even groups (by number of lines or runtime) and runs each group in a single process with its own database.

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

sudo apt-get -y install ruby-parallel-tests

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

You can also use apt command to install ruby-parallel-tests.

sudo apt -y install ruby-parallel-tests

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

sudo aptitude install ruby-parallel-tests

Summary

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