ruby-standalone command not found

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

Introduction

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

ruby-standalone: command not found

or when using sudo you get the following error message

sudo: ruby-standalone: command not found

Solutions to ruby-standalone: command not found

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

In Ubuntu ruby-standalone is provided by ruby-standalone package.

ruby-standalone is:

Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in perl). It is simple, straight-forward, and extensible.

This package provides a Ruby interpreter without providing support for other Debian-provided Ruby packages, i.e. it won’t use any code from Debian packages that provide Ruby libraries, Rubygems won’t recognize libraries installed with Debian packages etc.

This package is mostly useful for server deployments or development environments where one wants or needs to obtain the Ruby interpreter from Debian (and thus benefit from having security updates, not having to build from source, obtaining pre-built binaries from a trusted source etc.), but install everything else from sources external to Debian such as rubygems.org.

No official Debian Ruby packages, application or library, should depend on this package.

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

sudo apt-get -y install ruby-standalone

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

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

sudo apt -y install ruby-standalone

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

sudo aptitude install ruby-standalone

Summary

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