title: Rails Server error in psych.rb:370
body: <p>I'm running on a Mac any help would be appreciated.
  When I try to start my Rails Server I get the following error:</p>
  
  <pre><code>Richards-MBP:learn-rails richardxxxx$ rails server
  =&gt; Booting WEBrick
  =&gt; Rails 4.2.1 application starting in development on http://localhost:3000
  =&gt; Run `rails server -h` for more startup options
  =&gt; Ctrl-C to shutdown server
  Exiting
  /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:370:in `parse': (&lt;unknown&gt;): did not find expected key while parsing a block mapping at line 13 column 1 (Psych::SyntaxError)
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:370:in `parse_stream'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:318:in `parse'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/psych.rb:245:in `load'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/application.rb:391:in `secrets'
      from /Users/richardxxxx/Ruby/learn-rails/config/environments/development.rb:32:in `block in &lt;top (required)&gt;'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/railtie.rb:210:in `instance_eval'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/railtie.rb:210:in `configure'
      from /Users/richardxxxx/Ruby/learn-rails/config/environments/development.rb:1:in `&lt;top (required)&gt;'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/engine.rb:598:in `block (2 levels) in &lt;class:Engine&gt;'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/engine.rb:597:in `each'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/engine.rb:597:in `block in &lt;class:Engine&gt;'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:413:in `call'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
      from /Users/richardxxxx/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
      from /Users/richardxxxx/Ruby/learn-rails/config/environment.rb:5:in `&lt;top (required)&gt;'
      from /Users/richardxxxx/Ruby/learn-rails/config.ru:3:in `require'
      from /Users/richardxxxx/Ruby/learn-rails/config.ru:3:in `block in &lt;main&gt;'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
      from /Users/richardxxxx/Ruby/learn-rails/config.ru:in `new'
      from /Users/richardxxxx/Ruby/learn-rails/config.ru:in `&lt;main&gt;'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/server.rb:61:in `app'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/server.rb:139:in `log_to_stdout'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/server.rb:78:in `start'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/railties-4.2.1/lib/rails/commands.rb:17:in `&lt;top (required)&gt;'
      from /Users/richardxxxx/Ruby/learn-rails/bin/rails:8:in `require'
      from /Users/richardxxxx/Ruby/learn-rails/bin/rails:8:in `&lt;top (required)&gt;'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `load'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `call'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/client/command.rb:7:in `call'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/client.rb:26:in `run'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/bin/spring:48:in `&lt;top (required)&gt;'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `load'
      from /Users/richardxxxx/.rvm/gems/ruby-2.2.1@learn/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `&lt;top (required)&gt;'
      from /Users/richardxxxx/Ruby/learn-rails/bin/spring:13:in `require'
      from /Users/richardxxxx/Ruby/learn-rails/bin/spring:13:in `&lt;top (required)&gt;'
      from bin/rails:3:in `load'
      from bin/rails:3:in `&lt;main&gt;'
  Richards-MBP:learn-rails richardxxxx$ 
  </code></pre>
  
  <p>Secrets.yml</p>
  
  <p>development:
      secret_key_base:     xxxxxxxxxxxxxxxxx7b55dd0770dd2e4944b27f9e142ce21489b4d345d867d6264bb4115322d3b062cdc208994280f16f3f144fffdb6f81dd452b66d44</p>
  
  <pre><code>email_provider_username: &lt;%= ENV["xxxxxxx@gmail.com"] %&gt; 
  email_provider_password: &lt;%= ENV["xxxxxxxxx"] %&gt; 
  mailchimp_api_key: &lt;%= ENV["xxxxxxxxxxxxxxxx"] %&gt;
  mailchimp_list_id: &lt;%= ENV["xxxxxxxxxx"] %&gt; 
  #domain_name: example.com 
  owner_email: &lt;%= ENV["xxxxxxxx@gmail.com"] %&gt; 
  </code></pre>
  
  <p>test:
      secret_key_base: xxxxxxxxxxxxxxxx3c55f9391abd14598cf558fdf97f54257afe621beadc1932df61a00a3af47e56bc6d82b029439a429f9a1ce2a5e1d3a9654ac4bb7357</p>
  
  <p># Do not keep production secrets in the repository, 
   # instead read values from the environment. 
   production: </p>
  
  <pre><code>email_provider_username: &lt;%= ENV["GMAIL_USERNAME"] %&gt; 
  email_provider_password: &lt;%= ENV["GMAIL_PASSWORD"] %&gt; 
  mailchimp_api_key: &lt;%= ENV["MAILCHIMP_API_KEY"] %&gt; 
  mailchimp_list_id: &lt;%= ENV["MAILCHIMP_LIST_ID"] %&gt; 
  #domain_name: &lt;%= ENV["DOMAIN_NAME"] %&gt; 
  owner_email: &lt;%= ENV["OWNER_EMAIL"] %&gt; 
  secret_key_base: &lt;%= ENV["SECRET_KEY_BASE"] %&gt;
  </code></pre>