title: Rails production env "uninitialized constant (NameError)" error in unicorn startup
body: <p>My rails app fails to start when in production (using unicorn) but works perfectly fine in development.</p>
  
  <p>The exact error given is:</p>
  
  <pre><code>ERROR -- : uninitialized constant Grocer (NameError)
  </code></pre>
  
  <p>The error is generated on a custom initializer file I have created to initialise a Grocer connection.</p>
  
  <p>The problem isn't in the gem file. A '<em>bundle show grocer</em>' on the server shows Grocer is installed. </p>
  
  <p>'RAILS_ENV=production rails console' on the server loads correctly and Grocer is available there.</p>
  
  <p>My guess is that Unicorn is missing something... Is there any reason why when the rails app is started through unicorn it can't see the Grocer gem installed? Where should I look next to help debug this further?</p>