foreman command not found

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

Introduction

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

foreman: command not found

or when using sudo you get the following error message

sudo: foreman: command not found

Solutions to foreman: command not found

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

In Ubuntu foreman is provided by ruby-foreman package.

ruby-foreman is:

Foreman is a process manager commonly used during development of multi-component applications. For production, it allows allow you to either run your application directly or export it to some other process management format (i.e. init system service files).

Foreman uses a file called Procfile, which is the same mechanism for declaring what commands are run by your application’s dynos on the Heroku platform. It follows the process model. You can use a Procfile to declare various process types, such as multiple types of workers, a singleton process like a clock, or a consumer of the Twitter streaming API.

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

sudo apt-get -y install ruby-foreman

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

You can also use apt command to install ruby-foreman.

sudo apt -y install ruby-foreman

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

sudo aptitude install ruby-foreman

Summary

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