<?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>
	<pubDate>Thu, 08 Jan 2009 16:24:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</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-page-1/#comment-241747</link>
		<dc:creator>YAML and custom config for Rails projects &#187; Usable Web Apps</dc:creator>
		<pubDate>Wed, 30 Nov 2005 00:00: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-page-1/#comment-240926</link>
		<dc:creator>wwwaku &#187; Blog Archive &#187; Rails Code Reviewまとめ1</dc:creator>
		<pubDate>Sun, 30 Nov 2003 00:00: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-page-1/#comment-221611</link>
		<dc:creator>Steve C</dc:creator>
		<pubDate>Thu, 30 Nov 2000 00:00: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 "test:" 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-page-1/#comment-158919</link>
		<dc:creator>Barrett</dc:creator>
		<pubDate>Wed, 30 Nov 2005 00:00: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="ruby"&gt;
# app-specific config
require 'ostruct'
require 'yaml'
config = OpenStruct.new(YAML.load_file("#{RAILS_ROOT}/config/chef.yml"))
::AppConfig = OpenStruct.new(config.send(RAILS_ENV))
&lt;/code&gt;

Test:

&lt;code lang="ruby"&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 vibrant" style="overflow:auto;white-space:nowrap;width:455px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="co1"># app-specific config</span><br />
<span class="kw3">require</span> <span class="st0">'ostruct'</span><br />
<span class="kw3">require</span> <span class="st0">'yaml'</span><br />
config = OpenStruct.<span class="me1">new</span><span class="br0">&#40;</span><span class="kw4">YAML</span>.<span class="me1">load_file</span><span class="br0">&#40;</span><span class="st0">&quot;#{RAILS_ROOT}/config/chef.yml&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
::AppConfig = OpenStruct.<span class="me1">new</span><span class="br0">&#40;</span>config.<span class="me1">send</span><span class="br0">&#40;</span>RAILS_ENV<span class="br0">&#41;</span><span class="br0">&#41;</span></div></td></table></div>
<p>Test:</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;width:455px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br />2<br />3<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">def</span> test_test_base<br />
&nbsp; &nbsp; assert_not_nil AppConfig.<span class="me1">test_base</span><br />
&nbsp; <span class="kw1">end</span></div></td></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-page-1/#comment-155682</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 30 Nov 2009 00:00: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't work in 'test' environment (Rails 2.0.2).

Problem with:

[cc lang="ruby"]
env_config = config.send(RAILS_ENV)
[/cc]

It'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'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 vibrant" style="overflow:auto;white-space:nowrap;width:455px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="ruby codecolorer" style="font-family:Monaco,Lucida Console,monospace">env_config = config.<span class="me1">send</span><span class="br0">&#40;</span>RAILS_ENV<span class="br0">&#41;</span></div></td></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-page-1/#comment-138112</link>
		<dc:creator>link[rel=&#8217;developer&#8217;] &#187; Application Configuration</dc:creator>
		<pubDate>Thu, 30 Nov 2006 00:00: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-page-1/#comment-107070</link>
		<dc:creator>Karel Minařík</dc:creator>
		<pubDate>Thu, 30 Nov 2000 00:00: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-page-1/#comment-78732</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Tue, 30 Nov 2010 00:00: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'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="http://www.taknado.com/2007/7/25/custom-configuration-info-in-rails" rel="nofollow"&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-page-1/#comment-39158</link>
		<dc:creator>Seven rails tips &#124; www.neeraj.name</dc:creator>
		<pubDate>Sun, 30 Nov 2003 00:00: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'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-page-1/#comment-16457</link>
		<dc:creator>PartyZan</dc:creator>
		<pubDate>Wed, 30 Nov 2011 00:00: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>
