Senior & Expert RoR Developers Discussion Forum by Nyros Technologies

HIRE Ruby on Rails Expert Developers Programmers Coders From India
Ruby on Rails PHP .Net Developers Community, Nyros Technologies, Kakinada
 
Log in  or IF not a member please REGISTER
Username:
Password:   


Keyword
Log in | Profile 

Deploying Ruby on Rails Application with Passenger

 
Post new topic   Reply to topic    Senior & Expert RoR Developers Discussion Forum by Nyros Technologies Index -> Deployment
View previous topic :: View next topic  
Author Message
sivakrishna.m



Joined: 01 Jan 2008
Posts: 160
Location: Narsipatnam

PostPosted: Mon Nov 09, 2009 10:47 am    Post subject: Deploying Ruby on Rails Application with Passenger Reply with quote

Phusion Passenger is an Apache Module for making Ruby on Rails Applications. First of all think of OS , for Passenger which OS is Support for installing and configuration. Passenger will works on any POSIX compliant systems, except Microsoft Windows. For instant

1.Ubuntu Linux (8.04,7.10,6.06 .....)
2.Red Hat Enterprise Linux 5
3.MacOS X Tiger/Leopard
4.CentOS 5

Installing Phusion Passenger :
=======================

Installing Phusion Passenger is in two ways:

1.By Installing Passenger gem.
2.Native Ubuntu Linux Package (In My opinion , Go for this no headack with versions. )

Note: installation should done with “ROOT” access.

1.By Installing Phusion Passenger :-
Open a terminal and type the command
> gem install passenger

then for Apache type the following command
> passenger-install-apache2-module
if you want to install the Nginx version instead:
> passenger-install-nginx-module

and follow the instructions

2.Native Ubuntu Linux Package:-
add the following line to Third Party Software Sources

“deb http://apt.brightbox.net hardy main”
by using below command, we can add the line.

sudo sh -c 'echo “deb http://apt.brightbox.net hardy main” > /etc/apt/sources.list.d/brightbox.list'

then update the sources
> sudo apt-get update
then install the library for apache

> sudo apt-get install libapache2-mod-passenger
or for Nginx version
> sudo apt-get install nginx-brightbox


Now almost passenger installation was over.

Next to Deploy Ruby on Rails Application :
================================

Now we have a Ruby on Rails Application in the path /myapps/rails/sample_app and your Domain is www.sampleprofile.com. So for that you can either deploy the application to the virtual host's root (I.e www.sampleprofile.com ) or sub URI (I.e www.sampleprofile.com/railssample).

1. Deploying Rails with Virtual Host's Root :
=================================
Open the Apache Configuration File and add a virtual host entry for you rails application. Write the ServerName of your application Domain and specify Document Root to point out your ruby on rails application's “public” folder.

For instant :
<VirtualHost *:80>
ServerName www.sampleprofile.com
DocumentRoot /myapps/rails/sample_app/public
</VirtualHost>

And save file.

Now Restart the Apache server.

2 .Deploying Rails with Sub URI:
===========================


<VirtualHost *:80>
ServerName www.sampleprofile.com
DocumentRoot /myapps/rails/sample_app/public
</VirtualHost>

now you want to run the application www.sampleprofile.com/railssample
then you need to create a Symlink to the public directory .
> ln -s /myapps/rails/sample_app/public /myapps/rails/sample_app
then change the setting in Apache configuration file.


<VirtualHost *:80>
ServerName www.sampleprofile.com
DocumentRoot /myapps/rails
RailsBaseURI /sample_app
</VirtualHost>
Then Restart the server .

This Sub URI will used , when we deploying multiple Rails Applications.

To Restart the server in two ways:
===========================

1.Restarting the Apache server

2.By Creating or Updating tmp/restart.txt file, then Phusion Passenger will restart the rails application automatically.

By using the command

> touch tmp/restart.txt



Thank you,
Siva Krishna.M
Back to top
View user's profile Send private message Send e-mail
securians



Joined: 23 Jan 2010
Posts: 2

PostPosted: Sun Jan 31, 2010 11:42 am    Post subject: ror developers Reply with quote

Ruby on Rails or RoR, is an open source web application framework for the Ruby programming language.

We build quality Ruby On Rails web applications for start-ups and established businesses since early 2006. We focus on the core idea, perfect the interface, suggest innovative features and deliver; we help your company succeed faster by using the best technologies available.

Secure Next is a software technology corporation that develops, manufactures, and supports a wide range of software and web development projects. Headquartered in Fresno, California, USA, and its offshore in Chennai, India, we rock on every single projects we develop and venture into upcoming technology with a vision of agile web development & customer satisfaction. Thus, we want to make people feel informed and involved, committing quality and timeliness and ready to flourish using latest technology.

ref: www.rordevelopers.com & www.securenext.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Senior & Expert RoR Developers Discussion Forum by Nyros Technologies Index -> Deployment
Page 1 of 1

 latest topics 
 Topics   Replies   Author   Views   Last Post 
No new posts Built in classes in ruby
0 ktulasi 5 Thu Mar 11, 2010 1:09 pm
ktulasi View latest post
No new posts User defined classes and types of variables.
2 swaminadhan 31 Wed Mar 10, 2010 4:40 am
swaminadhan View latest post
No new posts Background & Introduction of ruby
0 Divya 34 Mon Mar 08, 2010 12:59 pm
Divya View latest post
No new posts i have lost the data in schema.rb file in rails application
0 Raja 43 Thu Mar 04, 2010 4:46 am
Raja View latest post
No new posts AlertPay
0 Raghu 30 Mon Mar 01, 2010 11:36 am
Raghu View latest post
No new posts have a problem while working with facebooker plugin
1 krishnakanth 35 Mon Mar 01, 2010 9:31 am
sharma I View latest post
No new posts Having issues while trying to run the application
1 sharma I 37 Mon Mar 01, 2010 8:56 am
swaminadhan View latest post
No new posts getting twitter tweets using twitter gem
0 sharma I 25 Mon Mar 01, 2010 8:21 am
sharma I View latest post
No new posts JavaScript functionality with Event handling class
0 umamahesh_nyros 23 Mon Mar 01, 2010 7:25 am
umamahesh_nyros View latest post
No new posts Differences between form_for and form_tag in rails
0 sharma I 51 Mon Mar 01, 2010 7:19 am
sharma I View latest post




Hire an expert Ruby on Rails developer / coder / programmer or development team from India now!!

Other Forums : PHP   ::   .Net   |   Free unlimited HTML CSS templates download

Nyros Technologies   |   Kakinada City Portal   |   Developers Blog   |   About Ruby on Rails Experts   |   More