BuycPanel Blog

BuycPanel Blog

Latest news and updates

How do you Install Ruby? What are the Basic Requirements?

Posted by Allura on 28 08 2019.

Warning:
It should be noted that cPanel has deprecated the legacy Ruby codebase in cPanel & WHM version 66. If you create any applications with the interfaces listed below, please note that those will not be supported:Ruby on Rails interface of cPanel (cPanel >> Home >> Software >> Ruby on Rails).
RubyGemsinterface of cPanel (cPanel >> Home >> Software >> RubyGems).
The Ruby Gem installerthat is present in WHM’s Module Installers interface (WHM >> Home >> Software >> Module Installers).If you want to install Ruby and create Ruby web applications in cPanel & WHM version 66 or later, you can follow the directions that are laid out in our How to Create Ruby Web Applications documentation.You have to run the following command to install Ruby:/usr/local/cpanel/scripts/installrubyNote:It should be remembered that Ruby on rails will not be able to function on Linux ServersPost installation
After you have finished installing Ruby, please ensure that you open the suitable firewall ports for your cPanel users. It should…

Warning:

It should be noted that cPanel has deprecated the legacy Ruby codebase in cPanel & WHM version 66. If you create any applications with the interfaces listed below, please note that those will not be supported:

  • Ruby on Rails interface of cPanel (cPanel >> Home >> Software >> Ruby on Rails).
  • RubyGemsinterface of cPanel (cPanel >> Home >> Software >> RubyGems).
  • The Ruby Gem installerthat is present in WHM’s Module Installers interface (WHM >> Home >> Software >> Module Installers).

If you want to install Ruby and create Ruby web applications in cPanel & WHM version 66 or later, you can follow the directions that are laid out in our How to Create Ruby Web Applications documentation.

You have to run the following command to install Ruby:

/usr/local/cpanel/scripts/installruby

Note:

It should be remembered that Ruby on rails will not be able to function on Linux Servers

Post installation

After you have finished installing Ruby, please ensure that you open the suitable firewall ports for your cPanel users. It should be remembered that by default Ruby applications begin on port 12001. Ruby application port numbers will keep on getting incremented with each new Ruby application.

Note:

As an example, the first Ruby on Rails® application that you create on your server will use port 12001, and the second Ruby on Rails application will use port 12002 and it will keep on progressing in this manner.

Files and directories

The table below will illustrate the files that the /scripts/installruby script will create:

FileDescription
/etc/init.d/rorThis is the initialization script for Ruby on Rails.
/usr/bin/rubyThis is Ruby binary.
/usr/bin/gemThis is Gem binary.

The table below will show the directories that the /scripts/installruby script creates:

DirectoryDescription
/usr/lib/ruby/This is the library directory for Ruby.
/root/.gem/This is the root directory for the entire system.

 

Requirements

Before you install Ruby, it is important to remember that you meet the installation requirements as listed below:

  • The server you are using has torun CentOS 6 or 7, Red Hat® Enterprise Linux® (RHEL) 6 or 7, or CloudLinux™ 6 or 7.

 

Note:

Presently Ruby on Rails installations on CentOS 7, CloudLinux 7, or RHEL 7 is not supported by us.

  • It is of absolute importance that you have root-level access on the server.
  • The installation of yum on your server mustfunction properly.

 

Note:

If you want to test your YUM configuration, you can easily log in to your server via SSH as the root user and run the command listed below:

yum list ruby

If you find that you are not seeing any errors after you run this command then you can be assured that your YUM configuration functions properly. The output of this command should resemble the example shown below:

1

2

3

4

5

6

7

8

9

10

11

Setting up repositories

update                    100% |=========================|  951 B    00:00

base                      100% |=========================| 1.1 kB    00:00

addons                    100% |=========================|  951 B    00:00

extras                    100% |=========================|  951 B    00:00

Reading repository metadata in from local files

primary.xml.gz            100% |=========================|  83 kB    00:00

sqlite cache needs updating, reading in metadata

update    : ################################################## 287/287

Excluding Packages in global exclude list

Finished

 

Concluding thoughts

This document details upon the requirements and the process of installation of Ruby.