Setting up a Ruby web application in cPanel
IMPORTANT: This is an advanced guide, and is intended to help Ruby application developers get started
cPanel supports the ability to create a Ruby application, here are the steps:
- Login to cPanel
- Click on Setup Ruby App under Software
- Under Setup new application
- Select the Ruby version you want to use
- Set the file path to your Ruby application
- Set the Domain and URI you want your application to be publicly accessed from
- Click Setup
Installing and managing Ruby Gems
There are a few ways to install a new gem in your ruby app.
Via the cPanel interface
The easiest way to install a Ruby gem, is to add them using the cPanel interface. Here are the steps:
- Login to cPanel
- Click on Setup Ruby App under Software
- Next to Modules click Show
- In the text box that appears above the list of modules, search of the gem you want to install (you may be asked to select a version).
- Click Add
Via SSH
Another way to install a Ruby gem, is via SSH. Here are the steps:
- Login to your service via SSH
- Run the command provided in the cPanel interface, to enter your applications virtual environment
- Once you’ve done that, you can install gems using the following shell command
gem install <gem name here>