Rails 4 - how can I use a constant in the /config/environments/production.rb file?
<p>In <code>config/data.yml</code>, I have:</p>

<pre><code>development:
  something: some_value
production:
  something: different_value
</code></pre>

<p>in <code>config/initializers/constants.rb</code>, I load it:</p>

<pre><code>CONST_DATA = YAML.load_file("#{::Rails.root}/config/data.yml")[::Rails.env]
</code></pre>

<p>and then I want to use this <code>CONST_DATA</code> in the  <code>/config/environments/production.rb</code> file, but when I do that, I get an error saying </p>

<pre><code>ERROR -- : uninitialized constant CONST_DATA (NameError)
</code></pre>

<p>How to make this constant accessible in the <code>/config/environments/production.rb</code> file?</p>

<p>Thank you</p>