Ruby on Rails
Valid for versions 82 through the latest version
Version:
82
Last modified: May 29, 2024
Looking for this interface?
Your hosting provider can enable or disable this interface in WHM's Feature Manager interface (WHM >> Home >> Packages >> Feature Manager).
Overview
This interface allows you to create and deploy a Ruby on Rails® application.
We deprecated this interface in cPanel & WHM version 66.
- To use this feature, your system administrators must enable it for you.
- Before you deploy a Ruby on Rails application, read the Ruby on Rails documentation.
Create a Ruby on Rails application
To create a Ruby application, perform the following steps:
- Ask your hosting provider to install Ruby on your system via the following EasyApache 4 packages:
- The
ea-apache24-mod_env
module. - The
ea-ruby24-ruby-devel
module.
- The
- Create a Ruby application on your server. For an example of how to do this, read our How to Create Ruby Web Applications documentation.
- Use cPanel’s Application Manager interface (cPanel » Home » Software » Application Manager) to register the application.
Create a Rewrite
Because Ruby on Rails uses its own server and does not respond on the standard HTTP port number 80
, you must specify the port where site visitors can access your Ruby on Rails application (for example, example.com:12001
).
- Ruby application port numbers increment automatically with every new application. If you are on a shared server, the system assigns the next available port number to your application.
- Your first application will not necessarily run on port
12001
.
To configure Ruby to respond without the need for visitors to specify a port number, create a rewrite.
To configure a rewrite, perform the following steps:
- In the Create A Rewrite table, click Create Rewrite for the appropriate application
- From the menu, select the domain, subdomain, or addon domain on which you wish to run your Ruby application.
- To run the application from a new page within your domain, enter the page name that you wish to use in the available text box.
- Click Save.
You can perform the following actions in the Current Rewrites table:
- To change an application path name, enter the path name in the text box.
- To save an application rewrite, click Save.
- To delete an application rewrite, click Delete.
Additional applications and rewrites
To run multiple Ruby applications, you must configure additional ports to respond with Ruby on Rails and, if necessary, additional rewrites to disguise the port change.
- To add additional Rails applications, follow the steps in the Create a Ruby on Rails application section.
- The new application will respond on the next available port number (for example, if your first application runs on port
12001
, the second may run on port12002
or higher).Warning:Ruby application port numbers increment automatically with every new application. If you are on a shared server, the system assigns the next available port number to your application. Also, your applications’ port numbers may not be consecutive. - To configure an additional rewrite, follow the steps in the Create a Rewrite section.
- You will need to use a new domain, addon domain, subdomain, or page (for example,
example.com/RubyApplication
) for the rewrite.Note:You cannot configure two Ruby applications to respond on the same domain, subdomain, addon domain, or page.
Note for resellers and web hosts
You can limit the number of Rails applications that your customers can install in WHM’s Modify an Account interface (WHM » Home » Account Functions » Modify An Account). Perform the following steps to set the maximum number of Rails applications:
- Click the domain name that you wish to limit.
- In the Max Mongrel instances (Ruby on Rails) text box, enter the maximum number of Rails applications that you wish to allow your customers to install.
- Click Save.