HostMonster Web Hosting Help

VPS or Dedicated - Installing and using RoR with Passenger


In this article you will find the instructions needed for installing a ruby, rails, and passenger, and the applications needed to get these working with apache.

These steps have been broken down in to 8 easy to follow steps.

Getting started

Firstly, this article is considered as outside the Scope of Technical Support.

Secondly, before you can follow this Help Desk article, you are going to need SSH access. If you don"t know how to get SSH access, please review these other Help Desk articles.

Installing Ruby on Rails and Passenger

This article assumes you are already logged in to the server through SSH as root.

  1. Installing the Basics

    We will be using the installruby script, located in /scripts, to get started. While this script installs more then what is listed here, below is what is important enough to take note.

    • Ruby 1.8,7
    • RubyGems 2.1.9, and 1.8.25
    • rails-2.3.18
    • rake-10.1.0
    • rack-1.1.6
    • mongrel-1.1.5

    # /scripts/installruby

  2. Installing Passenger

    Now that Ruby is installed we will use the following command:

    # gem install passenger mysql

  3. Installing curl-devel # yum install curl-devel

    When prompted "Is this ok [y/N]:" type the letter "y" and press Enter

  4. Installing postgresql-devel # yum install postgresql-devel

    Again, when prompted with the message "Is this ok [y/N]:" type the letter "y" and press Enter

  5. Installing ImageMagick # /scripts/installimagemagick
  6. Installing passenger modules, for apache # passenger-install-apache2-module

    Confirm by pressing Enter

    The system will check to see what you are missing, Press Enter

    1. When prompted "Are you sure you want to install against Apache 2.2.24 (/usr/bin/apxs)? [y/n]:" type the letter "y" and push enter.
      This will return "The Apache 2 module was successfully installed."
    2. Press Enter
    3. Add these lines to this file
      LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.21/buildout/apache2/
      PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.21
      PassengerDefaultRuby /usr/bin/ruby

      Alternatively you can add the above code with the follow command:

      echo -en "LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.21/buildout/apache2/\nPassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.21\nPassengerDefaultRuby /usr/bin/ruby\n" >> /usr/local/apache/conf/includes/pre_main_2.conf

  7. Restart Apache # service httpd restart
  8. Switch to your cPanel User

    Now you will need to install your application as the cPanel user, or else you will run in to permission issues.

    # su cpanelusr
    # cd ~

Final steps is to install an application, we happen to have an Help Desk article on installing Redmine

Knowledgebase Article 68,308 views bookmark tags: dedicated passenger redmine ruby vps (updated 684 days ago)

Was this resource helpful?

Did this resolve your issue?

Please add any other comments or suggestions about this content:

Recommended Help Content

How to install Redmine a Ruby on Rails application (updated 685 days ago)
Knowledgebase Article 34,944 views tags: redmine ruby

To help with transferring of accounts from other servers to your account. (updated 840 days ago)
Knowledgebase Article 60,669 views tags: account dedicated multi multiple reseller single transfer whm

To help with installing an SSL certificate for an account on a dedicated server through the WHM (updated 157 days ago)
Knowledgebase Article 72,225 views tags: assign dedicated server ssl whm

Related Help Content

This article will explain some common causes for 500 errors on Dedicated or V.P.S servers. (updated 160 days ago)
Knowledgebase Article 2,583 views tags: dedi dedicated error server vps

How to install NginX for reverse proxy and web performance enhancing. (updated 554 days ago)
Knowledgebase Article 49,826 views tags: dedicated nginx proxy reverse vps

How to install Java in a dedicated server. (updated 792 days ago)
Knowledgebase Article 47,598 views tags: dedicated install java server yum

Prices for Dedicated Hosting and Dedicated related addons (updated 323 days ago)
Knowledgebase Article 131,456 views tags: dedicated faq price

This article will explain how to restart the email related services on a Dedicated or VPS server. This may be useful if you are experiencing trouble with your email. (updated 127 days ago)
Knowledgebase Article 1,725 views tags: dedi dedicated dovecot exim mail restart vps whm

This article will explain how to create and manage users on Dedicated or VPS servers. (updated 37 days ago)
Knowledgebase Article 814 views tags: dedi dedicated users vps

This tutorial will help you be able to install the PHP PECL package APC. (Alternative PHP Cache) (updated 674 days ago)
Knowledgebase Article 45,567 views tags: caching dedicated pecl vps

This article will explain how to view the email logs on a Dedicated or VPS server. This may be usefull if you are experiencing trouble with your email. (updated 140 days ago)
Knowledgebase Article 1,762 views tags: dedi dedicated logs mail vps whm