title: Missing `secret_token` and `secret_key_base` - Rails 4.2.0 with RVM
body: <p>Recently I pulled one of my repos from Git. After launching the server, I am receiving the the following: <strong>Missing secret_token and secret_key_base</strong>.
  This may be happening because I've included the secrets.yml in my .gitignore.</p>
  
  <p>My current setup</p>
  
  <ul>
  <li>Ubuntu 14.04</li>
  <li>ruby 2.2.0p0</li>
  <li>rails 4.2.0</li>
  <li>rvm 1.26.11</li>
  <li>local server (not remote)</li>
  <li>development environment</li>
  </ul>
  
  <p>Many online resources state that I must gen a new key using <code>rake secret</code> and add it to the secrets.yml. Placing the key inside the secrets.yml and restarting the rails server does not work.</p>
  
  <hr>
  
  <blockquote>
    <p><strong>Edited: Added contents of secrets.yml below. -04/30/15 9:04 AM EST</strong></p>
  </blockquote>
  
  <pre><code>development:
      secret_key_base: LONG KEY HERE
  
  test:
    secret_key_base: LONG KEY HERE
  
  # Do not keep production secrets in the repository,
  # instead read values from the environment.
  production:
    secret_key_base: &lt;%= ENV["SECRET_KEY_BASE"] %&gt;
  </code></pre>
  
  <p>Please know this is set as a development environment on a local server in my place of residence (not Heroku).</p>
  
  <hr>
  
  <p>Other resources state I need to add an entry inside my <code>secret_token.rb</code> but this file does not exist in my project.</p>
  
  <p>The only way my application will run is if I were to create a <code>secret_token.rb</code> file and add either one of the following inside of it:</p>
  
  <pre><code>MyApp::Application.config.secret_token = if Rails.env.development? or Rails.env.test?
    ('x' * 30) # meets minimum requirement of 30 chars long
  else
    ENV['SECRET_TOKEN-']
  end
  </code></pre>
  
  <p>or </p>
  
  <pre><code>MyApp::Application.config.secret_token = 'the secret key'
  </code></pre>
  
  <p>Why is this file required when the Rails docs states to remove it?</p>
  
  <p><a href="http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml" rel="noreferrer">3.3 config/secrets.yml</a></p>
  
  <p>The secret_token.rb is not required in order to run for new generated projects, only the ones from my Git repo.</p>
  
  <p>Please advise on why my application needs secret_token.rb though the Rails docs state otherwise or my application will not run without it.</p>
  
  <blockquote>
    <p><strong>Edited: -04/30/15 9:27 AM EST</strong></p>
  </blockquote>
  
  <p>Another strange behavior is I can rename <code>secrets.yml</code> while the <code>secret_token.rb</code> remains in place and the application will still run.</p>
  
  <p>I attempted to rename the <code>secret_token.rb</code>, added <code>&lt;%= ENV["SECRET_KEY_BASE"] %&gt;</code> to development and I'm still experiencing the Missing secret_token issue.</p>
  
  <blockquote>
    <p><strong>Edited: Added git repo below. -05/08/15 2:50 AM EST</strong></p>
  </blockquote>
  
  <p>git repo: <a href="https://github.com/captain-awesome/blog_mac" rel="noreferrer">https://github.com/captain-awesome/blog_mac</a></p>
  
  <p>Something strange is if I were to modify any one of the 32 characters, save the secret_token.rb, reload the server...my app will run. Is the 32 character string in the secret_token.rb something I can make-up on my own? If so, what is the real purpose for rake secret?</p>