HostGator 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.
- Click Here for information about getting SSH Access
- Click Here for information about SSH Connections
Installing Ruby on Rails and Passenger
This article assumes you are already logged in to the server through SSH as root.
- 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 - Installing Passenger
Now that Ruby is installed we will use the following command:
# gem install passenger mysql - Installing curl-devel
# yum install curl-develWhen prompted "Is this ok [y/N]:" type the letter "y" and press Enter
- Installing postgresql-devel
# yum install postgresql-develAgain, when prompted with the message "Is this ok [y/N]:" type the letter "y" and press Enter
- Installing ImageMagick
# /scripts/installimagemagick - Installing passenger modules, for apache
# passenger-install-apache2-moduleConfirm by pressing Enter
The system will check to see what you are missing, Press Enter
- 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." - Press Enter
- 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/rubyAlternatively 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
- 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.
- Restart Apache
# service httpd restart - 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
197,064 views
bookmark
share
tags: dedicated passenger redmine ruby vps
Recommended Help Content
111,065 views
tags: backup cpanel dedicated hosting restore server transfer vps
Related Help Content
112,212 views
tags: application configserver csf dedicated django elastisearch ffmpeg java js litespeed mongodb nginx node private python server tomcat virtual vps
143,749 views
tags: centos cpanel dedicated hosting private server upgrade virtual vps
E-mail
Twitter
Google Bookmarks
Facebook
MySpace
Digg
Reddit
Delicious
LinkedIn
StumbleUpon