<?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: Flexible application configuration in Ruby on Rails</title>
	<atom:link href="http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/</link>
	<description>In my blog I'll try to describe about interesting technologies, my discovery in IT and some useful things about programming.</description>
	<lastBuildDate>Tue, 29 Dec 2009 10:34:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: YAML and custom config for Rails projects &#187; Usable Web Apps</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-241747</link>
		<dc:creator>YAML and custom config for Rails projects &#187; Usable Web Apps</dc:creator>
		<pubDate>Thu, 18 Mar 2010 18:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-241747</guid>
		<description>[...] HT: Dmitro Shteflyuk [...]</description>
		<content:encoded><![CDATA[<p>[...] HT: Dmitro Shteflyuk [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wwwaku &#187; Blog Archive &#187; Rails Code Reviewまとめ1</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-240926</link>
		<dc:creator>wwwaku &#187; Blog Archive &#187; Rails Code Reviewまとめ1</dc:creator>
		<pubDate>Thu, 18 Mar 2010 04:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-240926</guid>
		<description>[...] http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/ http://blog.bleything.net/2006/06/27/dry-out-your-database-yml [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/" rel="nofollow">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/</a> <a href="http://blog.bleything.net/2006/06/27/dry-out-your-database-yml" rel="nofollow">http://blog.bleything.net/2006/06/27/dry-out-your-database-yml</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve C</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-221611</link>
		<dc:creator>Steve C</dc:creator>
		<pubDate>Thu, 18 Mar 2010 01:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-221611</guid>
		<description>If you are getting errors when using this in your test environment you forgot to add &quot;test:&quot; to your .yml file

The example in this article had production and dev, but for some reason omits test</description>
		<content:encoded><![CDATA[<p>If you are getting errors when using this in your test environment you forgot to add &#8220;test:&#8221; to your .yml file</p>
<p>The example in this article had production and dev, but for some reason omits test</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barrett</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-158919</link>
		<dc:creator>Barrett</dc:creator>
		<pubDate>Thu, 18 Mar 2010 06:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-158919</guid>
		<description>It works for my Rails 2.0.2 project:

&lt;code lang=&quot;ruby&quot;&gt;
# app-specific config
require &#039;ostruct&#039;
require &#039;yaml&#039;
config = OpenStruct.new(YAML.load_file(&quot;#{RAILS_ROOT}/config/chef.yml&quot;))
::AppConfig = OpenStruct.new(config.send(RAILS_ENV))
&lt;/code&gt;

Test:

&lt;code lang=&quot;ruby&quot;&gt;
  def test_test_base
    assert_not_nil AppConfig.test_base
  end
&lt;/code&gt;

Passes.  When I change it to assert_nil it fails, and I see that it was actually set.</description>
		<content:encoded><![CDATA[<p>It works for my Rails 2.0.2 project:</p>
<div class="codecolorer-container ruby twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><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 /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;"># app-specific config</span><br />
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'ostruct'</span><br />
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'yaml'</span><br />
config = OpenStruct.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">YAML</span>.<span style="color:#9900CC;">load_file</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;#{RAILS_ROOT}/config/chef.yml&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
::AppConfig = OpenStruct.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>config.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span>RAILS_ENV<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></td></tr></tbody></table></div>
<p>Test:</p>
<div class="codecolorer-container ruby twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><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 /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> test_test_base<br />
&nbsp; &nbsp; assert_not_nil AppConfig.<span style="color:#9900CC;">test_base</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div></td></tr></tbody></table></div>
<p>Passes.  When I change it to assert_nil it fails, and I see that it was actually set.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-155682</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 18 Mar 2010 22:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-155682</guid>
		<description>This code does&#039;t work in &#039;test&#039; environment (Rails 2.0.2).

Problem with:

[cc lang=&quot;ruby&quot;]
env_config = config.send(RAILS_ENV)
[/cc]

It&#039;s strange that &lt;tt&gt;config.test()&lt;/tt&gt; work, but &lt;tt&gt;confg.send(&apos;test&apos;)&lt;/tt&gt; not.
I don&#039;t know why.  Can anyone explain this behaivor?</description>
		<content:encoded><![CDATA[<p>This code does&#8217;t work in &#8216;test&#8217; environment (Rails 2.0.2).</p>
<p>Problem with:</p>
<div class="codecolorer-container ruby twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><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 /></div></td><td><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">env_config = config.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span>RAILS_ENV<span style="color:#006600; font-weight:bold;">&#41;</span></div></td></tr></tbody></table></div>
<p>It&#8217;s strange that <tt>config.test()</tt> work, but <tt>confg.send(&apos;test&apos;)</tt> not.<br />
I don&#8217;t know why.  Can anyone explain this behaivor?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: link[rel=&#8217;developer&#8217;] &#187; Application Configuration</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-138112</link>
		<dc:creator>link[rel=&#8217;developer&#8217;] &#187; Application Configuration</dc:creator>
		<pubDate>Thu, 18 Mar 2010 19:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-138112</guid>
		<description>[...] plugin which does exactly that, using YAML. It&#8217;s based on the technique described by Dmytro Shtefluk  and uses OpenStruct to parse the config file and supports RAILS_ENV specific settings.Borrowing [...]</description>
		<content:encoded><![CDATA[<p>[...] plugin which does exactly that, using YAML. It&#8217;s based on the technique described by Dmytro Shtefluk  and uses OpenStruct to parse the config file and supports RAILS_ENV specific settings.Borrowing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karel Minařík</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-107070</link>
		<dc:creator>Karel Minařík</dc:creator>
		<pubDate>Thu, 18 Mar 2010 01:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-107070</guid>
		<description>Hi Dmitry,

I have expanded your idea into a plugin: http://agilewebdevelopment.com/plugins/application_configuration

I have been using your setup with great pleasure in couple of last projects.

Many thanks!

Karel</description>
		<content:encoded><![CDATA[<p>Hi Dmitry,</p>
<p>I have expanded your idea into a plugin: <a href="http://agilewebdevelopment.com/plugins/application_configuration" rel="nofollow">http://agilewebdevelopment.com/plugins/application_configuration</a></p>
<p>I have been using your setup with great pleasure in couple of last projects.</p>
<p>Many thanks!</p>
<p>Karel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-78732</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Thu, 18 Mar 2010 11:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-78732</guid>
		<description>Many thanks for the great idea. I&#039;ve decided to go further and now config file is parsed with ERB, one can have another file to override the values in the main file (when you place config.yml to svn and need specific values in your working copy) and config values can not be overwritten in the application (by mistake). Please &lt;a href=&quot;http://www.taknado.com/2007/7/25/custom-configuration-info-in-rails&quot; rel=&quot;nofollow&quot;&gt;check it out&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Many thanks for the great idea. I&#8217;ve decided to go further and now config file is parsed with ERB, one can have another file to override the values in the main file (when you place config.yml to svn and need specific values in your working copy) and config values can not be overwritten in the application (by mistake). Please <a href="http://www.taknado.com/2007/7/25/custom-configuration-info-in-rails" rel="nofollow">check it out</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seven rails tips &#124; www.neeraj.name</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-39158</link>
		<dc:creator>Seven rails tips &#124; www.neeraj.name</dc:creator>
		<pubDate>Thu, 18 Mar 2010 04:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-39158</guid>
		<description>[...] solutions have been posted for handling application level config file but this solution is by far the best. It&#039;s simple, DRY and works. Try it. You will love [...]</description>
		<content:encoded><![CDATA[<p>[...] solutions have been posted for handling application level config file but this solution is by far the best. It&#8217;s simple, DRY and works. Try it. You will love [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PartyZan</title>
		<link>http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-16457</link>
		<dc:creator>PartyZan</dc:creator>
		<pubDate>Thu, 18 Mar 2010 12:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/ruby-on-rails/flexible-application-configuration-in-ruby-on-rails/#comment-16457</guid>
		<description>Да не за что, мне уже помогло :)</description>
		<content:encoded><![CDATA[<p>Да не за что, мне уже помогло :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
