Ausweb Web Hosting and Web Development Tutorials

banner-tutorials
You are here

Ruby on Rails and cPanel VPS Hosting

Requirements for Ruby on Rails Hosting

There are a few major requirements for installing Ruby on Rails on a cPanel server. First, cPanel 11 must be running on the server. This can be verified by checking at the version number in the upper right-hand corner of WHM.

Installing Ruby on Rails in cPanel does require some command line interaction, so you will need to make sure that you can log into your server via SSH as root. Furthermore, cPanel requires that your server contain a working yum configuration. You can check this before trying to install Ruby by running yum list ruby from SSH, if it works without error, you should be fine.

Installation

The installation of Ruby on Rails in cPanel has two parts, first is installing Ruby itself, which can be accomplished by running /scripts/installruby . This script will install Ruby, RubyGems, Mongrel and the software that Ruby relies upon and activates the Ruby interface in your end user's cPanel.

The second step in the installation is running /usr/local/cpanel/bin/ror_setup . This script will setup Ruby on Rails so that it will be activated when your system starts.

Deploying a RoR hosting environment

Now that you have installed Ruby on Rails, you will want to deploy your first application environment.

Ruby on Rails works in a different manner from most of the web application languages used on cPanel servers. Ruby runs a separate server other than Apache for serving Ruby on Rails web applications, so setup for this requires a little more work. First you will need to login to your cPanel and click on the Ruby on Rails icon, to bring up the Ruby on Rails management interface that allows you to setup your Ruby environments. At this point, you will need to give your application a name and setup its path.

note Note: If you set this path inside of your public_html directory your application's source code and configuration files can be viewable by anyone on the web.

Once you have deployed your first environment, we will of course want to turn it on by clicking on the run icon next to Application's Name in the Manage Ruby on Rails interface. If this worked successfully, you should see running under status, and you should be able to click the URL icon under the Rails Server column to see a page that looks similar to this:

This page means that the environment is up and running, and for the rest of your Ruby on Rails application installation you will need to consult the application's installation guide.

If you pay close attention to the URL used for the application, you will see that it has a number like :12001 at the end of it. This is because Ruby on Rails does not use the standard Apache web server, but rather uses its own, called Mongrel.

We can change these to be user-friendly. You will need to create a new subdomain or addon domain in cPanel, then click on the create rewrite button next to the Rails application name in cPanel, select the desired domain name from the drop down box, and now, whenever you go to this domain, it will display the RoR application.

Basic Ruby on Rails Troubleshooting

Since Ruby on Rails uses its own web server, it has to run this web server on an alternate port. This causes an issue if you are running a firewall on your system. You will need to ensure that ports 12001 and up are open (we recommend making the max number of the open ports 12001 plus whatever the number of Ruby applications you expect to be running will be).

Sometimes the gems repos will go down. If this happens during the installation, you will need to re-run /scripts/installruby.

Articles In This Category
More from this Category
Virtual Server Tutorials > VPS Hosting Tutorials
Now that your new VPS is setup, there are just a few things that need to be done to make sure you can access your server and sites correctly....
Virtual Server Tutorials > VPS Hosting Tutorials
In order to use the "Yellow dog Updater Modified" (YUM) application to install software onto your VPS, you'll first need to configure this software. T...
Virtual Server Tutorials > VPS Hosting Tutorials
You may have some questions about what exactly a Virtual Private Server is, and how it can benefit your business whilst reducing costs at the same tim...
Virtual Server Tutorials > VPS Hosting Tutorials
This is a video on how to back up and restore your VPS with the Virtuozzo Power Panel....
Virtual Server Tutorials > VPS Hosting Tutorials
This is a video on how to configure your Virtuozzo Power Panel interface....
Related Articles
Related Articles
Tutorials > Domain Names
So you are looking at taking your domain folio to the next step? Ausweb offers free unlimited DNS hosting to customers or resellers with 10 domains o...
Plesk Tutorials > Plesk 10 - Tutorials
How to find and install applications in Plesk 10...
Plesk Tutorials > Plesk 10 - Tutorials
The following video tutorial will guide you through how to add and manage domains sub-domains in Plesk10...
Plesk Tutorials > Plesk 10 - Tutorials
The following video tutorial will guide you through how to view and manage website logs in Plesk10...
Plesk Tutorials > Plesk 10 Reseller
The following video tutorial will guide you through changing your password & contact information in Plesk 10...
Latest Articles
Latest Articles
Tutorials > Email Tutorial : FAQ for Email setup
This guide will help you configure your AUSWEB hosted email address with Outlook 2010....
Tutorials > Email Tutorial : FAQ for Email setup
This guide will help you setup and configure your AUSWEB hosted email address with Windows Live Mail (Outlook 2011)....
Tutorials > Partner (Affiliate) Guide
1. Visit http://partner.ausweb.com.au and click “Join Now” from the top navigation bar (or click the shiny green “Sign Up Now” button....
Tutorials > Website Security/Upgrade Issues
After installing an SSL, a commmon subsequent issue (in most modern browsers) is the the dreaded "Connection Partially Encrypted" warning.   The er...
Tutorials > Customer Testimonials
Now that you know about us, from us - this page is dedicated to what our customers think...
Most Read Articles
Most Read Articles
Tutorials > Joomla FAQ
A vulnerable extension is one that has been found to contain, or contribute to, a security vulnerability. Vulnerable extensions are not necessarily p...
Tutorials > phpBB Forum Hosting
Finally, after a long wait, phpBB3 has been released, and its relatively easy to upgrade your existing phpBB installation. phpBB3 introduces hundreds...
Tutorials > phpBB Forum Hosting
This video tutorial will show you how to create a new topic in phpBB3....
Tutorials > phpBB Forum Hosting
This video tutorial will show you how to set up a poll when starting a new topic in phpBB3...
Tutorials > phpBB Forum Hosting
phpBB3 is the latest update to the phpBB series, incorporating a plethora of new features, speed, stability and security improvements, and is much eas...