Missing 'secret_token' and 'secret_key_base' for 'production' environment (Puma)
<p>I don't understand why my secret_token and secret_key_base aren't being read by Puma. The app is being deployed through Capistrano, Nginx and Puma.</p>

<p>secrets.yml</p>

<pre><code>development:
  secret_key_base: XXXXXXXXXXXXXXXXXX
  secret_token: XXXXXXXXXXX

test:
  secret_key_base: XXXXXXXXXXXXXXXXXXXXXXXXXXXX

production:
  secret_key_base: &lt;%= ENV["SECRET_KEY_BASE"] %&gt;
  secret_token: &lt;%= ENV["SECRET_TOKEN"] %&gt;
</code></pre>

<p>My .gitignore file <strong>is not</strong> blocking my secrets.yml file, yet everytime I try to connect to my server I am told <code>An unhandled lowlevel error occurred. The application logs may have details.</code></p>

<p>And my application log tells me that I am <code>Missing 'secret_token' and 'secret_key_base' for 'production' environment</code></p>

<p>Full application log</p>

<pre><code>=== puma startup: 2016-04-05 07:00:04 -0400 ===
2016-04-05 07:00:09 -0400: Rack app error: #&lt;RuntimeError: Missing     `secret_token` and `secret_key_base` for 'production' environment, set these values in `config/secrets.yml`&gt;
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:534:in `validate_secret_key_config!'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:246:in `env_config'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/engine.rb:514:in `call'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:165:in `call'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/puma-3.2.0/lib/puma/configuration.rb:227:in `call'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/puma-3.2.0/lib/puma/server.rb:561:in `handle_request'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/puma-3.2.0/lib/puma/server.rb:406:in `process_client'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/puma-3.2.0/lib/puma/server.rb:271:in `block in run'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/puma-3.2.0/lib/puma/thread_pool.rb:111:in `call'
/home/deploy/apps/IASAS_site/shared/bundle/ruby/2.2.0/gems/puma-3.2.0/lib/puma/thread_pool.rb:111:in `block in spawn_thread'
</code></pre>

<p>Please help!</p>