title: Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml`
body: <p>When I navigate to my Rails production site, I get:</p>
  
  <pre><code>*** Exception RuntimeError in Rack application object (Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml`) (process 29032, thread 0x9b81a60(Worker 1)):
  </code></pre>
  
  <p>I see many solutions to this error is to export a environment variable with <code>export SECRET_KEY_BASE='a long string generated by running rake secret</code></p>
  
  <p>However that didn't work for me (I get the same error). I had to include in <code>config/environments/production.rb</code>:
  <code>config.secret_key_base = "a long string generated by running rake secret"</code> to solve this error.</p>
  
  <p>My question is, is this the right way, since the practice is to not commit the secret key? Is there any way to make Rails read from the environment variable?</p>
  
  <p>I'm using Ubuntu 14.04.1, Apache2, Phusion Passenger stack.</p>