<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Simone Carletti&#039;s Blog &#187; mod_rails</title>
	<atom:link href="http://www.simonecarletti.com/blog/tags/mod_rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.simonecarletti.com/blog</link>
	<description>Simone Carletti&#039;s personal ramblings on programming, syndication, search engines &#38; marketing.</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:48:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Running Capistrano with Passenger (mod_rails)</title>
		<link>http://www.simonecarletti.com/blog/2008/12/capistrano-deploy-recipe-with-passenger-mod_rails-taste/</link>
		<comments>http://www.simonecarletti.com/blog/2008/12/capistrano-deploy-recipe-with-passenger-mod_rails-taste/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 14:45:51 +0000</pubDate>
		<dc:creator>Simone Carletti</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[mod_rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.simonecarletti.com/blog/?p=3</guid>
		<description><![CDATA[This recipe enables you to integrate Passenger (mod_Rails) support with Capistrano.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-374" title="Capistrano logo" src="http://www.simonecarletti.com/blog/wp-content/uploads/2009/06/capistrano-logo.png" alt="Capistrano logo" width="150" height="57" />The following recipe enables you to <strong>deploy on a Passenger (mod_Rails) server with Capistrano</strong>. It&#8217;s a ready to use boilerplate, you just need to store it somewhere in your rails project (for example in the <code>config/deploy</code> folder) and <code>require</code> it from your <code>deploy.rb</code> file.<span id="more-3"></span></p>
<div class="codecolorer-container text default brush: ruby;" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#<br />
# = Capistrano Passenger deploy tasks<br />
#<br />
# Provides tasks for deploying a Rails application with Passenger (aka mod_rails).<br />
#<br />
# Category:: &nbsp; &nbsp;Capistrano<br />
# Package:: &nbsp; &nbsp; Passenger<br />
# Author:: &nbsp; &nbsp; &nbsp;Simone Carletti<br />
# Copyright:: &nbsp; 2007-2008 The Authors<br />
# License:: &nbsp; &nbsp; MIT License<br />
# Link:: &nbsp; &nbsp; &nbsp; &nbsp;http://www.simonecarletti.com/<br />
# Source:: &nbsp; &nbsp; &nbsp;http://gist.github.com/2769<br />
#<br />
#<br />
<br />
unless Capistrano::Configuration.respond_to?(:instance)<br />
&nbsp; abort &quot;This extension requires Capistrano 2&quot;<br />
end<br />
<br />
Capistrano::Configuration.instance.load do<br />
<br />
&nbsp; namespace :passenger do<br />
<br />
&nbsp; &nbsp; desc &lt;&lt;-DESC<br />
&nbsp; &nbsp; &nbsp; Restarts your application. \<br />
&nbsp; &nbsp; &nbsp; This works by creating an empty `restart.txt` file in the `tmp` folder<br />
&nbsp; &nbsp; &nbsp; as requested by Passenger server.<br />
&nbsp; &nbsp; DESC<br />
&nbsp; &nbsp; task :restart, :roles =&gt; :app, :except =&gt; { :no_release =&gt; true } do<br />
&nbsp; &nbsp; &nbsp; run &quot;touch #{current_path}/tmp/restart.txt&quot;<br />
&nbsp; &nbsp; end<br />
<br />
&nbsp; &nbsp; desc &lt;&lt;-DESC<br />
&nbsp; &nbsp; &nbsp; Starts the application servers. \<br />
&nbsp; &nbsp; &nbsp; Please note that this task is not supported by Passenger server.<br />
&nbsp; &nbsp; DESC<br />
&nbsp; &nbsp; task :start, :roles =&gt; :app do<br />
&nbsp; &nbsp; &nbsp; logger.info &quot;:start task not supported by Passenger server&quot;<br />
&nbsp; &nbsp; end<br />
<br />
&nbsp; &nbsp; desc &lt;&lt;-DESC<br />
&nbsp; &nbsp; &nbsp; Stops the application servers. \<br />
&nbsp; &nbsp; &nbsp; Please note that this task is not supported by Passenger server.<br />
&nbsp; &nbsp; DESC<br />
&nbsp; &nbsp; task :stop, :roles =&gt; :app do<br />
&nbsp; &nbsp; &nbsp; logger.info &quot;:stop task not supported by Passenger server&quot;<br />
&nbsp; &nbsp; end<br />
<br />
&nbsp; end<br />
<br />
&nbsp; namespace :deploy do<br />
<br />
&nbsp; &nbsp; desc &lt;&lt;-DESC<br />
&nbsp; &nbsp; &nbsp; Restarts your application. \<br />
&nbsp; &nbsp; &nbsp; Overwrites default :restart task for Passenger server.<br />
&nbsp; &nbsp; DESC<br />
&nbsp; &nbsp; task :restart, :roles =&gt; :app, :except =&gt; { :no_release =&gt; true } do<br />
&nbsp; &nbsp; &nbsp; passenger.restart<br />
&nbsp; &nbsp; end<br />
<br />
&nbsp; &nbsp; desc &lt;&lt;-DESC<br />
&nbsp; &nbsp; &nbsp; Starts the application servers. \<br />
&nbsp; &nbsp; &nbsp; Overwrites default :start task for Passenger server.<br />
&nbsp; &nbsp; DESC<br />
&nbsp; &nbsp; task :start, :roles =&gt; :app do<br />
&nbsp; &nbsp; &nbsp; passenger.start<br />
&nbsp; &nbsp; end<br />
<br />
&nbsp; &nbsp; desc &lt;&lt;-DESC<br />
&nbsp; &nbsp; &nbsp; Stops the application servers. \<br />
&nbsp; &nbsp; &nbsp; Overwrites default :start task for Passenger server.<br />
&nbsp; &nbsp; DESC<br />
&nbsp; &nbsp; task :stop, :roles =&gt; :app do<br />
&nbsp; &nbsp; &nbsp; passenger.stop<br />
&nbsp; &nbsp; end<br />
<br />
&nbsp; end<br />
<br />
end</div></td></tr></tbody></table></div>
<p>This extension creates the following Capistrano tasks under the <code>passenger</code> namespace:</p>
<ol>
<li>start</li>
<li>stop</li>
<li>restart</li>
</ol>
<p>Additionally, it overwrites the default Capistrano <code>deploy:start/stop/restart</code> tasks to fully integrate Passenger into your current deployment strategy.</p>
<p>Please note that, due to Passenger architecture, only <code>restart</code> task is supported. <code>start</code> and <code>stop</code> task are available only for compatibility purpose. Invoking <code>deploy:start</code> or <code>deploy:stop</code> will simply return a warning.</p>
<p>The most recent version of this recipe is <a href="http://gist.github.com/3102">available as a Gist (#3102)</a>.</p>
<p>Related posts<ol>
<li><a href='http://www.simonecarletti.com/blog/2010/07/capistrano-executing-a-command-as-root-without-using-sudo/' rel='bookmark' title='Capistrano: Executing a command as root without using sudo'>Capistrano: Executing a command as root without using sudo</a></li>
<li><a href='http://www.simonecarletti.com/blog/2011/02/how-to-restart-god-when-you-deploy-a-new-release/' rel='bookmark' title='How to restart God when you deploy a new release via Capistrano'>How to restart God when you deploy a new release via Capistrano</a></li>
<li><a href='http://www.simonecarletti.com/blog/2009/02/capistrano-uploads-folder/' rel='bookmark' title='Capistrano: Managing an uploads folder'>Capistrano: Managing an uploads folder</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.simonecarletti.com/blog/2008/12/capistrano-deploy-recipe-with-passenger-mod_rails-taste/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

