Skip to main content

How to Deploy a Ruby Application in cPanel

You can deploy a Ruby application to your hosting account using the cPanel Application Manager. This process allows you to run Ruby applications in a managed environment where the Ruby runtime and necessary dependencies are handled by the system.

You can deploy a Ruby application to your hosting account using the cPanel Application Manager. This process allows you to run Ruby applications in a managed environment where the Ruby runtime and necessary dependencies are handled by the system.

Important: This feature is only available on specific Hostek plans that support the Ruby runtime. If you do not see the Application Manager icon in your cPanel dashboard, contact Hostek support to verify your plan's eligibility.

Before you begin

You will need:

  • A cPanel account with the "Account User" role.

  • A Hostek hosting plan that includes the Ruby runtime.

  • Your application's source code (e.g., from a local machine or a Git repository).

  • A prepared Gemfile and bundle configuration for your Ruby application.

Deploying your Ruby application

  1. Log in to your cPanel account.

  2. Locate the Software section and select Application Manager.

  3. Click Add Application (or the equivalent button to create a new entry).

  4. Enter the following details:

    • Application Name: Enter a unique name for your application.

    • Application Path: Enter the directory path where your application files are located (e.g., /public_html/my-ruby-app).

    • Ruby Version: Select the appropriate Ruby version from the dropdown menu.

  5. Click Create or Save.

  6. Navigate to the directory of your application via the File Manager or via SSH.

  7. Run the bundle command to install your dependencies.

    bundle install

  8. Restart the application via the Application Manager to apply any changes to the environment or code.

Confirm the result

  • The application status in the Application Manager should show as "Running" or "Active."

  • You can verify the deployment by visiting your application's URL in a web browser.

If the application fails to start

If the application does not start or shows a "500 Internal Server Error," check the following:

  • Gemfile issues: Ensure all gems listed in your Gemfile are compatible with the selected Ruby version.

  • Path errors: Verify that the Application Path in the Application Manager matches the actual directory where your code resides.

  • Port configuration: Ensure your application is configured to listen on the port assigned by the Application Manager.

Limitations

  • This procedure does not include instructions for setting up a custom Ruby environment outside of the standard Application Manager.

  • Changes to the Ruby version may require a restart of the application to take effect.

  • This process does not automatically manage your database migrations; these must be performed manually via your preferred method.

Did this answer your question?