Our cPanel web hosting has Ruby Gem enabled, it means that you can create and deploy your Ruby application on our Ruby on Rails environment. Ruby on Rails runs on its own server so the setup requires a little extra work.
By using your cPanel interface, you can create and deploy a Ruby on Rails application. Follow the instructions below!
- Log into cPanel.
- Navigate to the Software/Services section of your cPanel interface.
- Click the Ruby on Rails icon.
- This step will open the Ruby on Rails management interface.
- Specify your application’s name in the App Name field.
- Remember: To set your application to load when the server is booted, click the Load on Boot? checkbox.
- Assign the application path in the Application Path field.
- Note: If you set an application path in your
public_html/
directory, your source code and configuration files can be viewed by anyone on the web.
- Note: If you set an application path in your
- Use the Environment drop-down menu to select the type of Ruby on Rails environment you wish to run.
- Click Create.
Available Ruby on Rails Applications table actions:
- To be directed to an application’s Rails server, click URL to the right of the appropriate application name.
- To run/stop an application, click Run or Stop to the right of the appropriate application name.
- To load an application on boot, click the Load on Boot? box to the right of the appropriate application name.
- To toggle an application between a production or development environment, click the Production or Development box to the right of the appropriate application name.
- To delete an application, click X to the right of the appropriate application name.
Creating a Rewrite for Your Ruby Application
Because Ruby on Rails uses its own server, users visiting your website (and subsequently your Ruby on Rails application) will need to be redirected to the appropriate port.
Ruby does not respond on the standard HTTP port number, 80. Thus, visitors would need to specify the port number with the domain — for example, example.com:12001.
Remember: Ruby application port numbers increment automatically with every new application. This means that, if you are on a shared server, you will simply be assigned the next available port number. Your first application will not necessarily run on port 12001.
To configure Ruby to respond without visitors having to specify a port number, you will need to configure a rewrite.
To configure a rewrite:
- Log into cPanel.
- Navigate to the Software/Services section of your cPanel interface.
- Click the Ruby on Rails icon.
- This step will open the Ruby on Rails management interface.
- Click the Create Rewrite button corresponding to the appropriate application in the Create A Rewrite table.
- From the drop-down menu, select the domain, subdomain, or addon domain on which you wish to run your Ruby application.
- If you wish to run the application from a new page within your domain, type the page name you wish to use into the available text field.
- Click the Save button.
Current Rewrites table actions:
- To change an application path name, type in the box to the right of the appropriate application name.
- To save an application rewrite, click Save to the right of the appropriate application name.
- To delete an application rewrite, click Delete to the right of the appropriate application name. Then, click Yes to confirm.
Source cPanel Doc
User Related Search
- cpanel ruby rails blank page