update_rubygems command not found

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

Introduction

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

update_rubygems: command not found

or when using sudo you get the following error message

sudo: update_rubygems: command not found

Solutions to update_rubygems: command not found

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

In Ubuntu update_rubygems is provided by ruby-rubygems package.

ruby-rubygems is:

A package (also known as a library) contains a set of functionality that can be invoked by a Ruby program, such as reading and parsing an XML file. These packages are called ‘gems’ and RubyGems is a tool to install, create, manage and load these packages in your Ruby environment. RubyGems is also a client for RubyGems.org, a public repository of Gems that allows you to publish a Gem that can be shared and used by other developers.

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

sudo apt-get -y install ruby-rubygems

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

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

sudo apt -y install ruby-rubygems

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

sudo aptitude install ruby-rubygems

Summary

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