title: rails, access constant defined in environment.rb
body: <p>I am quite new to Rails, and I want to use a REST service based on an API key. Things work fine if I define the API key as a constant in the controller class.</p>
  
  <p>Some recommend that constants as API keys to be stored in <code>/config/environment.rb</code>. I defined the constants there, but I can't access them and get his error <code>uninitialized constant</code>. </p>
  
  <p>Is there anything else I have to do, than defining constants? Do I have to include any file?</p>
  
  <p>my  /config/environments.rb file looks like this: </p>
  
  <pre><code># Load the rails application
  require File.expand_path('../application', __FILE__)
  
  # Initialize the rails application
  Apis::Application.initialize!
  
  KEY_1 = "aghtbjki"
  SHARED_SECRET_1 = "plkjuvfe"
  KEY_2 = "ljfebjyf"
  </code></pre>
  
  <p>I added only the last  three lines.</p>
  
  <p>It may be a simple issue, but it is my first project in Rails.</p>