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 About Modules,Mixins and Namespaces
0 swaminadhan 7 Sat Mar 20, 2010 12:01 pm
swaminadhan View latest post
No new posts Railsdav plugin
0 swaminadhan 9 Sat Mar 20, 2010 11:20 am
swaminadhan View latest post
No new posts Deploying the rails applicatin in Heroku
0 Divya 14 Fri Mar 19, 2010 12:23 pm
Divya View latest post
No new posts overridig existing methods
0 Raja 14 Fri Mar 19, 2010 11:28 am
Raja View latest post
No new posts Class Methods
0 Raja 11 Fri Mar 19, 2010 11:04 am
Raja View latest post
No new posts Objects methods
0 Raja 13 Fri Mar 19, 2010 10:50 am
Raja View latest post
No new posts Documentation
0 Anu 24 Thu Mar 18, 2010 4:01 am
Anu View latest post
No new posts File handling in ruby
0 Anu 31 Wed Mar 17, 2010 2:14 pm
Anu View latest post
No new posts sending an email from rb file
0 umamahesh_nyros 21 Wed Mar 17, 2010 6:13 am
umamahesh_nyros View latest post
No new posts difference bewteen render component and render partial
0 umamahesh_nyros 20 Wed Mar 17, 2010 6:06 am
umamahesh_nyros 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