rake command not found

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

Introduction

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

rake: command not found

or when using sudo you get the following error message

sudo: rake: command not found

Solutions to rake: command not found

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

In Ubuntu rake is provided by rake package.

rake is:

Rake is a simple ruby build program with capabilities similar to make.

Rake has the following features:

  • Rakefiles (rakes version of Makefiles) are completely defined in standard Ruby syntax. No XML files to edit. No quirky Makefile syntax to worry about (is that a tab or a space?)
  • Users can specify tasks with prerequisites.
  • Rake supports rule patterns to sythesize implicit tasks.
  • Rake is lightweight. It can be distributed with other projects as a single file. Projects that depend upon rake do not require that rake be installed on target systems.

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

sudo apt-get -y install rake

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

You can also use apt command to install rake.

sudo apt -y install rake

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

sudo aptitude install rake

Summary

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