<?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>MyFunnyDev &#187; Ruby</title>
	<atom:link href="http://michalkuklis.com/blog/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://michalkuklis.com/blog</link>
	<description>web, coding and beyond</description>
	<lastBuildDate>Fri, 25 Jun 2010 05:51:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Gemcutter &amp; Jeweler</title>
		<link>http://michalkuklis.com/blog/2009/10/17/gemcutter-jeweler/</link>
		<comments>http://michalkuklis.com/blog/2009/10/17/gemcutter-jeweler/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 05:03:47 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=240</guid>
		<description><![CDATA[More about gemcutter &#038; jeweler  can be found here.
Here are the steps how to publish patched gem cloned from github:
1. Append username to gem name in .gemspec or if you use jeweler open Rakefile and edit Jeweler::Tasks section save it and run:

rake gemspec

2. Build gem with:

gem build

3. Push new gem to gemcutter

gem push

]]></description>
			<content:encoded><![CDATA[<p>More about <a href="http://gemcutter.org/">gemcutter</a> &#038; <a href="http://github.com/technicalpickles/jeweler">jeweler </a> can be found <a href="http://railscasts.com/episodes/183-gemcutter-jeweler">here</a>.</p>
<p>Here are the steps how to publish patched gem cloned from github:</p>
<p>1. Append username to gem name in .gemspec or if you use jeweler open Rakefile and edit Jeweler::Tasks section save it and run:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">rake gemspec</pre></div></div>

<p>2. Build gem with:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">gem build</pre></div></div>

<p>3. Push new gem to gemcutter</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">gem push</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/10/17/gemcutter-jeweler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cron in Ruby</title>
		<link>http://michalkuklis.com/blog/2009/07/27/cron-in-ruby/</link>
		<comments>http://michalkuklis.com/blog/2009/07/27/cron-in-ruby/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 06:10:35 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=230</guid>
		<description><![CDATA[Check out how Whenever gem can simplify cron configuration.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://railscasts.com/episodes/164-cron-in-ruby">Check out</a> how <a href="http://github.com/javan/whenever/tree/master">Whenever</a> gem can simplify cron configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/07/27/cron-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>daemon_controller + Thinking Sphinx</title>
		<link>http://michalkuklis.com/blog/2009/07/22/daemon_controller-thinking-sphinx/</link>
		<comments>http://michalkuklis.com/blog/2009/07/22/daemon_controller-thinking-sphinx/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 06:13:02 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=220</guid>
		<description><![CDATA[I&#8217;ve created simple rails initiator in order to start Sphinx through daemon_controller based on the Thinking Sphinx configuration. I hope it will help somebody.

require 'daemon_controller'
&#160;
def before_start
  if not ThinkingSphinx.define_indexes?
    config = ThinkingSphinx::Configuration.instance
    cmd = &#34;#{config.bin_path}#{config.indexer_binary_name} --config \&#34;#{config.config_file}\&#34; --all&#34;
    cmd &#60;&#60; &#34; --rotate&#34; if ThinkingSphinx.sphinx_running?
  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created simple rails initiator in order to start <a href="http://sphinxsearch.com/">Sphinx</a> through <a href="http://blog.phusion.nl/2008/08/25/daemon_controller-a-library-for-robust-daemon-management/">daemon_controller</a> based on the <a href="http://freelancing-god.github.com/ts/en/">Thinking Sphinx</a> configuration. I hope it will help somebody.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'daemon_controller'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">def</span> before_start
  <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#9966CC; font-weight:bold;">not</span> ThinkingSphinx.<span style="color:#9900CC;">define_indexes</span>?
    config = <span style="color:#6666ff; font-weight:bold;">ThinkingSphinx::Configuration</span>.<span style="color:#9900CC;">instance</span>
    cmd = <span style="color:#996600;">&quot;#{config.bin_path}#{config.indexer_binary_name} --config <span style="color:#000099;">\&quot;</span>#{config.config_file}<span style="color:#000099;">\&quot;</span> --all&quot;</span>
    cmd <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#996600;">&quot; --rotate&quot;</span> <span style="color:#9966CC; font-weight:bold;">if</span> ThinkingSphinx.<span style="color:#9900CC;">sphinx_running</span>?
    <span style="color:#CC0066; font-weight:bold;">system</span> cmd
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#9966CC; font-weight:bold;">defined</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>ThinkingSphinx<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#9966CC; font-weight:bold;">not</span> ThinkingSphinx.<span style="color:#9900CC;">sphinx_running</span>? 
    conf_instance = <span style="color:#6666ff; font-weight:bold;">ThinkingSphinx::Configuration</span>.<span style="color:#9900CC;">instance</span>
    <span style="color:#0066ff; font-weight:bold;">@controller</span> = DaemonController.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>
      <span style="color:#ff3333; font-weight:bold;">:identifier</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'Sphinx search server'</span>,
      <span style="color:#ff3333; font-weight:bold;">:start_command</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;#{conf_instance.bin_path}#{conf_instance.searchd_binary_name} --pidfile --config <span style="color:#000099;">\&quot;</span>#{conf_instance.config_file}<span style="color:#000099;">\&quot;</span>&quot;</span>,
      <span style="color:#ff3333; font-weight:bold;">:before_start</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> method<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:before_start</span><span style="color:#006600; font-weight:bold;">&#41;</span>,
      <span style="color:#ff3333; font-weight:bold;">:ping_command</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#CC0066; font-weight:bold;">lambda</span> <span style="color:#006600; font-weight:bold;">&#123;</span> TCPSocket.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>conf_instance.<span style="color:#9900CC;">configuration</span>.<span style="color:#9900CC;">searchd</span>.<span style="color:#9900CC;">address</span>, conf_instance.<span style="color:#9900CC;">configuration</span>.<span style="color:#9900CC;">searchd</span>.<span style="color:#9900CC;">port</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>,
      <span style="color:#ff3333; font-weight:bold;">:pid_file</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> conf_instance.<span style="color:#9900CC;">configuration</span>.<span style="color:#9900CC;">searchd</span>.<span style="color:#9900CC;">pid_file</span>,
      <span style="color:#ff3333; font-weight:bold;">:log_file</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> conf_instance.<span style="color:#9900CC;">configuration</span>.<span style="color:#9900CC;">searchd</span>.<span style="color:#9900CC;">log</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#0066ff; font-weight:bold;">@controller</span>.<span style="color:#9900CC;">start</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/07/22/daemon_controller-thinking-sphinx/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ruby maxins in rails plugins</title>
		<link>http://michalkuklis.com/blog/2009/07/20/ruby-maxins-in-rails-plugins/</link>
		<comments>http://michalkuklis.com/blog/2009/07/20/ruby-maxins-in-rails-plugins/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 01:16:46 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=175</guid>
		<description><![CDATA[Very often when looking at the code in rails plugins you can run into this:

module Taggable 
  def self.included&#40;base&#41;
    base.extend&#40;ClassMethods&#41;
  end
  module module ClassMethods
    #methods here
  end
end

This is a part of a bigger pattern which is shown below:

module ModuleA
  def self.included&#40;base&#41;
    [...]]]></description>
			<content:encoded><![CDATA[<p>Very often when looking at the code in rails plugins you can run into this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">module</span> Taggable 
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">included</span><span style="color:#006600; font-weight:bold;">&#40;</span>base<span style="color:#006600; font-weight:bold;">&#41;</span>
    base.<span style="color:#9900CC;">extend</span><span style="color:#006600; font-weight:bold;">&#40;</span>ClassMethods<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">module</span> <span style="color:#9966CC; font-weight:bold;">module</span> ClassMethods
    <span style="color:#008000; font-style:italic;">#methods here</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This is a part of a bigger pattern which is shown below:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">module</span> ModuleA
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">included</span><span style="color:#006600; font-weight:bold;">&#40;</span>base<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#008000; font-style:italic;"># add class methods from ModuleB</span>
    base.<span style="color:#9900CC;">extend</span><span style="color:#006600; font-weight:bold;">&#40;</span>ModuleB<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">module</span> ModuleB
  <span style="color:#9966CC; font-weight:bold;">def</span> act_as_hello
    <span style="color:#CC0066; font-weight:bold;">p</span> <span style="color:#996600;">&quot;hello from module B&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> ClassC
 <span style="color:#008000; font-style:italic;">#class body here</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># include moduleA in classC</span>
ClassC.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:include</span>, ModuleA<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> ClassD <span style="color:#006600; font-weight:bold;">&lt;</span> ClassC
  act_as_hello
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
classD = ClassD.<span style="color:#9900CC;">new</span></pre></div></div>

<p>The pattern is used often when developing plugins with ActiveRecord. What we gain by inheriting from ClassC  (<b>class ClassD < ClassC</b>) are instance methods from ModuleA. This is done by:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">ClassC.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:include</span>, ModuleA<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Moreover since ModuleA is included in ClassC, ModuleA&#8217;s initializer <strong>def self.included(base)</strong> will be invoked at the time  ModuleA is mixed with ClassC. The invocation will call <b>base.extend(ModuleB)</b>. In this case <b>base</b> represents ClassC which will be extended by adding class methods from ModuleB. The ModuleA&#8217;s init method is shown again below:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">included</span><span style="color:#006600; font-weight:bold;">&#40;</span>base<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#008000; font-style:italic;"># add class methods from ModuleB to ClassC</span>
  base.<span style="color:#9900CC;">extend</span><span style="color:#006600; font-weight:bold;">&#40;</span>ModuleB<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>At the end our ClassD has now access to all class methods defined in ModuleB.  <strong>act_as_hello</strong> will be called during ClassD initialization:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> ClassD <span style="color:#006600; font-weight:bold;">&lt;</span> ClassC
  act_as_hello
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/07/20/ruby-maxins-in-rails-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>capistrano recipes for ubuntu</title>
		<link>http://michalkuklis.com/blog/2009/07/19/capistrano-recipes-for-ubuntu/</link>
		<comments>http://michalkuklis.com/blog/2009/07/19/capistrano-recipes-for-ubuntu/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 03:25:22 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=172</guid>
		<description><![CDATA[Few nice capistrano recipes which may help you automate Ubuntu Server setup:

ubuntu-machine
slicehost

]]></description>
			<content:encoded><![CDATA[<p>Few nice capistrano recipes which may help you automate Ubuntu Server setup:</p>
<ul>
<li><a href="http://suitmymind.github.com/ubuntu-machine/">ubuntu-machine</a></li>
<li><a href="http://github.com/josh/slicehost/tree/master">slicehost</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/07/19/capistrano-recipes-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decoration in Ruby</title>
		<link>http://michalkuklis.com/blog/2009/06/30/decoration-in-ruby/</link>
		<comments>http://michalkuklis.com/blog/2009/06/30/decoration-in-ruby/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 04:59:38 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=166</guid>
		<description><![CDATA[Interesting discussion about object decoration in ruby.
]]></description>
			<content:encoded><![CDATA[<p>Interesting discussion about <a href="http://blog.rubybestpractices.com/posts/gregory/008-decorator-delegator-disco.html">object decoration in ruby</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/06/30/decoration-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>few more ruby links</title>
		<link>http://michalkuklis.com/blog/2009/05/18/few-more-ruby-links/</link>
		<comments>http://michalkuklis.com/blog/2009/05/18/few-more-ruby-links/#comments</comments>
		<pubDate>Mon, 18 May 2009 23:24:42 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=160</guid>
		<description><![CDATA[
class and instance methods
include vs extend again 

]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://railstips.org/2009/5/11/class-and-instance-methods-in-ruby">class and instance methods</a></li>
<li><a href="http://railstips.org/2009/5/15/include-verse-extend-in-ruby">include vs extend again </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/05/18/few-more-ruby-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>going back to ruby again&#8230;</title>
		<link>http://michalkuklis.com/blog/2009/04/04/go-back-to-ruby-again/</link>
		<comments>http://michalkuklis.com/blog/2009/04/04/go-back-to-ruby-again/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 18:05:00 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=148</guid>
		<description><![CDATA[Here are few links which helped me understand few ruby concepts:

include vs extend
include,extend,module_eval,class_eval
anonymous classes (aka singleton classes)
ruby-metaprogramming-techniques

]]></description>
			<content:encoded><![CDATA[<p>Here are few links which helped me understand few ruby concepts:</p>
<ul>
<li><a href="http://www.fromjavatoruby.com/2008/10/include-vs-extend.html">include vs extend</a></li>
<li><a href="http://neeraj.name/blog/articles/503-include-extend-module_eval-class_eval">include,extend,module_eval,class_eval</a></li>
<li><a href="http://pmade.com/articles/2008/ruby-singleton">anonymous classes (aka singleton classes)</a></li>
<li><a href="http://ola-bini.blogspot.com/2006/09/ruby-metaprogramming-techniques.html">ruby-metaprogramming-techniques</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/04/04/go-back-to-ruby-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stage deployment with capistrano and passenger</title>
		<link>http://michalkuklis.com/blog/2009/03/14/stage-deployment-with-capistrano/</link>
		<comments>http://michalkuklis.com/blog/2009/03/14/stage-deployment-with-capistrano/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 22:20:36 +0000</pubDate>
		<dc:creator>Michał Kuklis</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[capistrano]]></category>

		<guid isPermaLink="false">http://michalkuklis.com/blog/?p=124</guid>
		<description><![CDATA[I&#8217;m still looking around for a stage deployment setup with Capistrano.
Here are few ideas/links I found useful.

multi_staging_environment_for_rails_using_capistrano_and_mod_rails
deploying-to-staging-and-production-with-capistrano
using-capistrano-with-passenger-mod_rails/

Update:
It turned out this is pretty simple with the capistrano-ext gem:
http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage

set :default_stage, &#34;development&#34;
set :stages, %w&#40;production testing development&#41;
require 'capistrano/ext/multistage'

]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: line-through;">I&#8217;m still looking around for a stage deployment setup with Capistrano.<br />
Here are few ideas/links I found useful.</span></p>
<ul>
<li><a href="http://www.cjohansen.no/en/rails/multi_staging_environment_for_rails_using_capistrano_and_mod_rails">multi_staging_environment_for_rails_using_capistrano_and_mod_rails</a></li>
<li><a href="http://devblog.famundo.com/articles/2006/09/28/deploying-to-staging-and-production-with-capistrano">deploying-to-staging-and-production-with-capistrano</a></li>
<li><a href="http://jimneath.org/2008/05/10/using-capistrano-with-passenger-mod_rails/">using-capistrano-with-passenger-mod_rails/</a></li>
</ul>
<p><strong>Update:<br />
</strong>It turned out this is pretty simple with the capistrano-ext gem:<a href="http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage"></p>
<p>http://weblog.jamisbuck.org/2007/7/23/capistrano-multistage</a></p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">set <span style="color:#ff3333; font-weight:bold;">:default_stage</span>, <span style="color:#996600;">&quot;development&quot;</span>
set <span style="color:#ff3333; font-weight:bold;">:stages</span>, <span style="color:#006600; font-weight:bold;">%</span>w<span style="color:#006600; font-weight:bold;">&#40;</span>production testing development<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'capistrano/ext/multistage'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://michalkuklis.com/blog/2009/03/14/stage-deployment-with-capistrano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
