<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Capistrano variables</title>
	<atom:link href="http://drnicwilliams.com/2007/04/10/capistrano-variables/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Mon, 21 Nov 2011 19:26:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Alexander</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-219517</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Mon, 02 Aug 2010 15:22:14 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-219517</guid>
		<description>Thank you for this tip.
I needed it for deploying sinatra app. I have to set remote RACK_ENV variable when deploying.

Saved my time!</description>
		<content:encoded><![CDATA[<p>Thank you for this tip.<br />
I needed it for deploying sinatra app. I have to set remote RACK_ENV variable when deploying.</p>
<p>Saved my time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sesli sohbet</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-182212</link>
		<dc:creator>sesli sohbet</dc:creator>
		<pubDate>Tue, 07 Jul 2009 17:39:01 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-182212</guid>
		<description>In Cap2 this appears to be just ‘variables’ instead of ‘configuration.variables’.</description>
		<content:encoded><![CDATA[<p>In Cap2 this appears to be just ‘variables’ instead of ‘configuration.variables’.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: topfunky</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-36708</link>
		<dc:creator>topfunky</dc:creator>
		<pubDate>Mon, 09 Jul 2007 20:44:21 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-36708</guid>
		<description>In Cap2 this appears to be just &#039;variables&#039; instead of &#039;configuration.variables&#039;.</description>
		<content:encoded><![CDATA[<p>In Cap2 this appears to be just &#8216;variables&#8217; instead of &#8216;configuration.variables&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayne Seguin</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-16703</link>
		<dc:creator>Wayne Seguin</dc:creator>
		<pubDate>Sat, 14 Apr 2007 13:59:02 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-16703</guid>
		<description>Nic,

Please read my reply:

http://groups.google.com/group/capistrano/browse_thread/thread/d4d30393b6f41605

Thanks,
  ~Wayne</description>
		<content:encoded><![CDATA[<p>Nic,</p>
<p>Please read my reply:</p>
<p><a href="http://groups.google.com/group/capistrano/browse_thread/thread/d4d30393b6f41605" rel="nofollow">http://groups.google.com/group/capistrano/browse_thread/thread/d4d30393b6f41605</a></p>
<p>Thanks,<br />
  ~Wayne</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr Nic</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-16332</link>
		<dc:creator>Dr Nic</dc:creator>
		<pubDate>Wed, 11 Apr 2007 11:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-16332</guid>
		<description>@all - see http://groups.google.com/group/capistrano/browse_thread/thread/d4d30393b6f41605 for discussion about the mysterious #lines variable/method.</description>
		<content:encoded><![CDATA[<p>@all &#8211; see <a href="http://groups.google.com/group/capistrano/browse_thread/thread/d4d30393b6f41605" rel="nofollow">http://groups.google.com/group/capistrano/browse_thread/thread/d4d30393b6f41605</a> for discussion about the mysterious #lines variable/method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergio Espeja</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-16309</link>
		<dc:creator>Sergio Espeja</dc:creator>
		<pubDate>Wed, 11 Apr 2007 08:48:17 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-16309</guid>
		<description>Very useful!

This is a good capistrano variables example and also a very useful recipe!

I&#039;ve started using this recipe and blogged it in spanish at my blog: http://spejman.blogspot.com/2007/04/logs-del-servidor-con-capistrano.html

Thanks for your post!</description>
		<content:encoded><![CDATA[<p>Very useful!</p>
<p>This is a good capistrano variables example and also a very useful recipe!</p>
<p>I&#8217;ve started using this recipe and blogged it in spanish at my blog: <a href="http://spejman.blogspot.com/2007/04/logs-del-servidor-con-capistrano.html" rel="nofollow">http://spejman.blogspot.com/2007/04/logs-del-servidor-con-capistrano.html</a></p>
<p>Thanks for your post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: choonkeat</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-16291</link>
		<dc:creator>choonkeat</dc:creator>
		<pubDate>Wed, 11 Apr 2007 05:17:29 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-16291</guid>
		<description>I have a &quot;ask&quot; method in my capistrano instead: http://pastie.caboo.se/52993

So I&#039;ll do
&lt;code&gt;
ask :server_port, &quot;Port number&quot;, &quot;3000&quot;
puts server_port
&lt;/code&gt;

If the value is given at command line via -S server_port=5000 then it won&#039;t ask, otherwise prompt.</description>
		<content:encoded><![CDATA[<p>I have a &#8220;ask&#8221; method in my capistrano instead: <a href="http://pastie.caboo.se/52993" rel="nofollow">http://pastie.caboo.se/52993</a></p>
<p>So I&#8217;ll do<br />
<code><br />
ask :server_port, "Port number", "3000"<br />
puts server_port<br />
</code></p>
<p>If the value is given at command line via -S server_port=5000 then it won&#8217;t ask, otherwise prompt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr Nic</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-16287</link>
		<dc:creator>Dr Nic</dc:creator>
		<pubDate>Wed, 11 Apr 2007 04:53:25 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-16287</guid>
		<description>@topfunky - that&#039;s how I thought it should work too. But it wasn&#039;t working, hence hunting down configuration.variables hash.

Here&#039;s the same action using local variables:

&lt;pre&gt;
task :log do
  lines &#124;&#124;= 100
  rails_env &#124;&#124;= &#039;production&#039;
  # lines     = configuration.variables[:lines] &#124;&#124; 100
  # rails_env = configuration.variables[:rails_env] &#124;&#124; &#039;production&#039;
  env   = ENV[&#039;RAILS_ENV&#039;] &#124;&#124; &#039;production&#039;
  run &quot;tail -n #{lines} #{deploy_to}/#{shared_dir}/log/#{rails_env}.log&quot; do &#124;ch, stream, out&#124;
    puts out
  end
end
&lt;/pre&gt;

But when I run &lt;code&gt;cap log -s lines=10&lt;/code&gt; it still looks for the default 100.

I&#039;ll ping it to the capistrano mailing list/Jamis and see if anyone can reproduce this.</description>
		<content:encoded><![CDATA[<p>@topfunky &#8211; that&#8217;s how I thought it should work too. But it wasn&#8217;t working, hence hunting down configuration.variables hash.</p>
<p>Here&#8217;s the same action using local variables:</p>
<pre>
task :log do
  lines ||= 100
  rails_env ||= 'production'
  # lines     = configuration.variables[:lines] || 100
  # rails_env = configuration.variables[:rails_env] || 'production'
  env   = ENV['RAILS_ENV'] || 'production'
  run "tail -n #{lines} #{deploy_to}/#{shared_dir}/log/#{rails_env}.log" do |ch, stream, out|
    puts out
  end
end
</pre>
<p>But when I run <code>cap log -s lines=10</code> it still looks for the default 100.</p>
<p>I&#8217;ll ping it to the capistrano mailing list/Jamis and see if anyone can reproduce this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: topfunky</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-16283</link>
		<dc:creator>topfunky</dc:creator>
		<pubDate>Wed, 11 Apr 2007 04:37:08 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-16283</guid>
		<description>Actually, you don&#039;t even need the configuration.variables part! It&#039;s almost as magic as Dr. Nic&#039;s models.

Anything passed with dash-s becomes a local variable in your Capistrano recipes.</description>
		<content:encoded><![CDATA[<p>Actually, you don&#8217;t even need the configuration.variables part! It&#8217;s almost as magic as Dr. Nic&#8217;s models.</p>
<p>Anything passed with dash-s becomes a local variable in your Capistrano recipes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: atmos</title>
		<link>http://drnicwilliams.com/2007/04/10/capistrano-variables/comment-page-1/#comment-16272</link>
		<dc:creator>atmos</dc:creator>
		<pubDate>Wed, 11 Apr 2007 03:20:26 +0000</pubDate>
		<guid isPermaLink="false">http://drnicwilliams.com/2007/04/10/capistrano-variables/#comment-16272</guid>
		<description>Nice!  I hadn&#039;t used that before.</description>
		<content:encoded><![CDATA[<p>Nice!  I hadn&#8217;t used that before.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

