haml command not found

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

Introduction

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

haml: command not found

or when using sudo you get the following error message

sudo: haml: command not found

Solutions to haml: command not found

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

In Ubuntu haml is provided by ruby-haml package.

ruby-haml is:

Haml (HTML Abstraction Markup Language) is a layer on top of XHTML or XML that’s designed to express the structure of XHTML or XML documents in a non-repetitive, elegant, easy way, using indentation rather than closing tags and allowing Ruby to be embedded with ease.

It was originally envisioned as a plugin for Ruby on Rails, but it can function as a stand-alone templating engine.

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

sudo apt-get -y install ruby-haml

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

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

sudo apt -y install ruby-haml

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

sudo aptitude install ruby-haml

Summary

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