| View previous topic :: View next topic |
| Author |
Message |
sivakrishna.m
Joined: 01 Jan 2008 Posts: 160 Location: Narsipatnam
|
Posted: Mon Nov 09, 2009 10:47 am Post subject: Deploying Ruby on Rails Application with Passenger |
|
|
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 |
|
 |
securians
Joined: 23 Jan 2010 Posts: 2
|
Posted: Sun Jan 31, 2010 11:42 am Post subject: ror developers |
|
|
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 |
|
 |
|
|