title: Unicorn undefined method error in production
body: <p>I'm running a Ruby on Rails application on Heroku using Rails 4.1.4, Unicorn 4.8.3 and Ruby 2.1.1. I've tried to keep the development and production environments similar. In development, Unicorn runs just fine.</p>
  
  <p>In production I get this in the logs:</p>
  
  <pre><code>» 21:54:50.942 2014-08-08 01:54:50.645897+00:00 app web.2 - - /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:651:in `worker_loop'
  » 21:54:50.942 2014-08-08 01:54:50.645898+00:00 app web.2 - - /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
  » 21:54:50.947 2014-08-08 01:54:50.645900+00:00 app web.2 - - /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:536:in `maintain_worker_count'
  » 21:54:50.947 2014-08-08 01:54:50.645902+00:00 app web.2 - - /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:294:in `join'
  » 21:54:50.947 2014-08-08 01:54:50.645904+00:00 app web.2 - - /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `&lt;top (required)&gt;'
  » 21:54:50.947 2014-08-08 01:54:50.645905+00:00 app web.2 - - /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `load'
  » 21:54:50.947 2014-08-08 01:54:50.645907+00:00 app web.2 - - /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `&lt;main&gt;'
  » 21:54:50.947 2014-08-08 01:54:50.706442+00:00 app web.2 - - E, [2014-08-08T01:54:50.705828 #609] ERROR -- : undefined method `[]=' for nil:NilClass (NoMethodError)
  » 21:54:50.947 2014-08-08 01:54:50.706451+00:00 app web.2 - - ./config/unicorn.rb:24:in `block in reload'
  » 21:54:50.947 2014-08-08 01:54:50.706454+00:00 app web.2 - - /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:622:in `call'
  » 21:54:50.958 2014-08-08 01:54:48.473529+00:00 heroku web.1 - - Error R12 (Exit timeout) -&gt; At least one process failed to exit within 10 seconds of SIGTERM Warning
  » 21:54:50.971 2014-08-08 01:54:50.665188+00:00 app web.1 - - E, [2014-08-08T01:54:50.665105 #2] ERROR -- : reaped #&lt;Process::Status: pid 487 exit 1&gt; worker=0
  » 21:54:50.973 2014-08-08 01:54:50.722566+00:00 app web.1 - - E, [2014-08-08T01:54:50.722003 #495] ERROR -- : undefined method `[]=' for nil:NilClass (NoMethodError)
  » 21:54:50.973 2014-08-08 01:54:50.722572+00:00 app web.1 - - ./config/unicorn.rb:24:in `block in reload'
  » 21:54:50.973 2014-08-08 01:54:50.722574+00:00 app web.1 - - /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:622:in `call'
  » 21:54:50.973 2014-08-08 01:54:50.722576+00:00 app web.1 - - /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:622:in `init_worker_process'
  </code></pre>
  
  <p>The app pretty much doesn't start. I've searched for the <code>undefined method `[]=' for nil:NilClass (NoMethodError)</code> error in Google and here -- nothing helpful came up.</p>
  
  <p>Any ideas?</p>