How to Install Legacy Ruby


Last modified: December 4, 2020

Overview

Warning:

This document only applies to cPanel & WHM version 64 and earlier. We deprecated the legacy Ruby codebase in cPanel & WHM version 66. We will not support any applications you create with the following interfaces:

  • cPanel’s Ruby on Rails interface (cPanel » Home » Software » Ruby on Rails).

  • cPanel’s RubyGems interface (cPanel » Home » Software » RubyGems).

  • The Ruby Gem installer feature in WHM’s Module Installers interface (WHM » Home » Software » Module Installers).

To install Ruby and create Ruby web applications in cPanel & WHM version 66 and later, follow the directions in our How to Create Ruby Web Applications documentation.

Installation

Run the following command to install Ruby:

/usr/local/cpanel/scripts/installruby

Post installation

After you install Ruby, make certain that you open the appropriate firewall ports for your cPanel users. By default, Ruby applications begin on port 12001. Ruby application port numbers automatically increment with each new Ruby application.

For example, the first Ruby on Rails® application that you create on your server uses port 12001, while the second Ruby on Rails application uses port 12002.

Files and directories

The /scripts/installruby script creates the following files:

  • /etc/init.d/ror — The initialization script for Ruby on Rails.
  • /usr/bin/ruby — The Ruby binary.
  • /usr/bin/gem — The Gem binary.

The /scripts/installruby script creates the following files:

  • /usr/lib/ruby/ — The library directory for Ruby.
  • /root/.gem/ — The root directory for the entire system.

Additional Documentation