BuycPanel Blog

BuycPanel Blog

Latest news and updates

How do you Troubleshoot a Ruby Installation?

Posted by Allura on 25 06 2019.

Warning:
The legacy Ruby codebase in cPanel & WHM version 66 has been deprecated by us. We will not be able to support any applications you create with the interfaces listed below:Ruby on Railsinterface of cPanel (cPanel >> Home >> Software >> Ruby on Rails).
RubyGemsinterface of cPanel (cPanel >> Home >> Software >> RubyGems).
The Ruby Gem installerthat is present in WHM’s Module Installers interface (WHM >> Home >> Software >> Module Installers).If you want to install Ruby and create Ruby web applications in cPanel & WHM version 66 or later, you have to follow the directions which are laid out in our How to Create Ruby Web Applications documentation.A Brief Introduction
This document provides insights into several problems that you may experience with your Ruby installation.Ruby on Rails® web server portIt should be remembered that Ruby on Rails uses its own web server, which has to run on an alternate port. If you run a firewall on your system then that could cause…

Warning:

The legacy Ruby codebase in cPanel & WHM version 66 has been deprecated by us. We will not be able to support any applications you create with the interfaces listed below:

  • Ruby on Railsinterface of cPanel (cPanel >> Home >> Software >> Ruby on Rails).
  • RubyGemsinterface of cPanel (cPanel >> Home >> Software >> RubyGems).
  • The Ruby Gem installerthat is present in WHM’s Module Installers interface (WHM >> Home >> Software >> Module Installers).

If you want to install Ruby and create Ruby web applications in cPanel & WHM version 66 or later, you have to follow the directions which are laid out in our How to Create Ruby Web Applications documentation.

A Brief Introduction

This document provides insights into several problems that you may experience with your Ruby installation.

Ruby on Rails® web server port

It should be remembered that Ruby on Rails uses its own web server, which has to run on an alternate port. If you run a firewall on your system then that could cause an issue.

Important:

You have to ensure that you have opened each and every Ruby application’s port in your firewall. It is strongly recommended that you only open the range of ports that are mandatory to access each application (for example, if you want to run six Ruby applications, just open ports 12001  through  12006  on the firewall).

Unavailable RubyGems repository

Sometimes, the RubyGems repository will not be available. If you find that the RubyGems repository is not present during the installation process, you have to run the /usr/local/cpanel/scripts/installruby script again.

If you want more information you can go through the Ruby documentation.

Mongrel-specific errors

If you want to troubleshoot Mongrel-specific errors you can review the /log/mongrel.log file.

  • If you see that the errors indicate gems which are uninstalled, you can install them with the gem install name command, the gem name here will be represented by the name.
  • If you find out that the errors indicate the wrong version of gems, you can simply run the gem uninstall command, and then you can simply reinstall the correct gem version.

You can also manually restart the Mongrel server to resolve other issues that you may face. If you want to do this then just run the following command:

mongrel_rails start -p -d -e production -P log/mongrel.pid

Note:

You can run this command from the Ruby on Rails application’s base directory as the sole user who has ownership over the Ruby application.

Other problems

You can sometimes encounter a problem which is unidentified. If such a situation arises you can simply perform the actions listed below to troubleshoot the issue:

  • You can use Ruby’s tools which are built inside to diagnose the issue.

Note:

It should be remembered that cPanel & WHM use the standard set of Ruby on Rails tools.

  • You can check the /usr/local/cpanel/logs/error_log file and the /log/mongrel.log file for Ruby-related errors.
  • You can also check for application-specific errors in the /log/mongrel.log file.

 

Concluding thoughts

This document details upon the process of troubleshooting a Ruby.