This document will help a user to install a Sinatra web application. Sinatra can be used to create web applications on the Ruby platform which can be registered in cPanel’s Application Manager interface (cPanel >> Home >> Software >> Application Manager).
One can even use cPanel’s Terminal interface (cPanel >> Home >> Advanced >> Terminal) in order to perform these steps in cPanel & WHM version 72 and later.
One needs to make sure that the following EasyApache 4 RPMs exist on one’s server:
It is to note that after enabling this module, the system will disable Apache’s mod_userdir module.
In order to install these RPM’s, one has to run the following command:
yum install ea-ruby24-mod_passenger ea-ruby24-ruby-devel ea-apache24-mod_env
To install the Sinatra Gem, one needs to run the following command:
scl enable ea-ruby24 ‘gem install Sinatra’
If one does not wish to use the scl utility, there are other steps to install the Sinatra Gem.
One can also create an additional terminal session.
After the installation of the Sinatra Ruby gem, one can create the application’s directory path which can be relative to one’s home directory, like:
class Fools < Sinatra::Base
get ‘/’ do
‘Fools Rush In’
One can register the application after setting the file permissions. For this, one needs to use UAPI’s PassengerApps::register_application function, or cPanel’s Application Manager interface (cPanel >> Home >> Software >> Application Manager).
This step can be optional. The above functions will make the Apache restart but may not necessarily execute immediately.
In order to restart Apache by creating application’s Apache configuration, ne needs to run the following command:
One can access the application in cPanel’s Application Manager interface (cPanel >> Home >> Software >> Application Manager) after the restarting of the Apache.
This feature helps a user to create web applications on the Ruby platform with these technical steps.