rackup command not found

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

Introduction

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

rackup: command not found

or when using sudo you get the following error message

sudo: rackup: command not found

Solutions to rackup: command not found

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

In Ubuntu rackup is provided by ruby-rack package.

ruby-rack is:

Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call.

Also see http://rack.github.io/.

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

sudo apt-get -y install ruby-rack

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

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

sudo apt -y install ruby-rack

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

sudo aptitude install ruby-rack

Summary

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