FastDomain Web Hosting Help

VPS or Dedicated - Installing and using RoR with Passenger

Summary

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
      /usr/local/apache/conf/includes/pre_main_2.conf
      LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.21/buildout/apache2/mod_passenger.so
      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/mod_passenger.so\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 90,111 views bookmark tags: dedicated passenger redmine ruby vps


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
Knowledgebase Article 62,744 views tags: redmine ruby

How do I install my own Ruby Gems?
Knowledgebase Article 117,059 views tags: gem install ruby

When I attempt to execute my Ruby on Rails application I receive "500- Premature end of script."
Knowledgebase Article 85,423 views tags: premature rails ruby script

Related Help Content

What Ruby on Rails version and Gems are installed?
Knowledgebase Article 93,778 views tags: gem gems rails ruby

This article will explain how to disable SSLv3 on a VPS or Dedicated server. This can help you avoid issues with vulnerabilities in SSLv3.
Knowledgebase Article 25,294 views tags: dedi dedicated ssl vps

What is the path to Ruby?
Knowledgebase Article 106,778 views tags: path ruby

My Ruby on Rails installation keeps displaying a '404 Not Found' error.
Knowledgebase Article 162,985 views tags: file missing public rails ruby

How do I setup Ruby on Rails?
Knowledgebase Article 327,845 views tags: rails ruby

A step-by-step guide to renewing your hosting account.
Knowledgebase Article 108,298 views tags: hosting renew

What if my website becomes too popular, or is on the front page of Digg, Reddit, or similar site?
Knowledgebase Article 160,345 views tags: dedicated hosting popular resources shared

This article explains the steps to set up an email account on your domain.
Getting Started Article 4,348,310 views tags: account email setup