Page Title
Body "Phusion Passenger":http://www.modrails.com/, or mod_rails/mod_rack, is an Apache module that greatly simplifies Ruby web application deployment. Before you can start using "Phusion Passenger":http://www.modrails.com/ you will need to install a few items on your existing RailsMachine virtual private server. This guide will walk you through the preparation of your RailsMachine, the installation of Phusion Passenger, and the conversion of your existing application to use Phusion Passenger. h2. Upgrading Ruby Gems If you are using a version of RubyGems before the 1.2 version release on your server you will need to <a href="/UpgradingRubyGems">upgrade</a> to avoid complications during the install. h2. Install Phusion Passenger and Ruby Enterprise Edition Execute the following commands from your deploy user account on your Rails Machine. <pre><code># make a place to do the install mkdir passenger_install cd passenger_install # download and start the installer wget http://assets.railsmachine.com/wiki/centos_passenger_install.sh sh centos_passenger_install.sh </code></pre> h2. Optional: Using Ruby Enterprise Edition Ruby Enterprise Edition comes with a set of pre-installed gems. You will need to install the gems that are missing from Ruby Enterprise Edition's line up. You must specify the path to Enterprise Ruby as it is not in your path. After you are done installing your gems, modify the /etc/httpd/conf.d/passenger.conf to use Ruby Enterprise Edition. <pre><code># re-install all of your regular-Ruby gems with Enterprise Ruby gem list | grep -v passenger | awk ' (NR != 1 && NR != 2 ) {print $1}' | xargs sudo /opt/ree/bin/gem install --no-ri --no-rdoc sudo /opt/ree/bin/gem install mysql -- --with-mysql-config </code></pre> <pre><code># change /etc/httpd/conf.d/passenger.conf to use Enterprise Ruby #LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-2.2.8/ext/apache2/mod_passenger.so #PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-2.2.8 #PassengerRuby /usr/bin/ruby # Ruby Enterprise Edition settings LoadModule passenger_module /opt/ree/lib/ruby/gems/1.8/gems/passenger-2.2.8/ext/apache2/mod_passenger.so PassengerRoot /opt/ree/lib/ruby/gems/1.8/gems/passenger-2.2.48 PassengerRuby /opt/ree/bin/ruby </code></pre> h3. Restart Apache <pre><code>#restart apache sudo /etc/init.d/httpd restart # Check to see that Passenger loaded successfully sudo /usr/sbin/apachectl -t -D DUMP_MODULES 2>&1 | grep passenger # If it wasn’t listed in the step above, make sure that /etc/httpd/conf/httpd.conf contains this line: Include conf.d/*.conf </code></pre> h1. Capistrano and Passenger The following steps should be performed on your local development machine not on your Rails Machine. <pre><code># install lastest railsmachine gem (on your local machine) sudo gem install railsmachine # add :app_server option to your deploy.rb set :app_server, :passenger # switch to Passenger cap app:switch </code></pre>
Make page private