title: Rails server run under production mode but access database under development-database
body: <p>I found an strange issue.</p>
  
  <p>I run <code>rails server -e production</code>, and put <code>binding.pry</code> in my controller.</p>
  
  <p>And the Resque <code>rake resque:work QUEUE='*'</code> will trgger the  method later.</p>
  
  <p>First,  it will create a new instance in  production database.</p>
  
  <p>Then, I dig into <code>binding.pry</code></p>
  
  <p>I try to  pull all the data from the model by  <code>MODEL.all</code></p>
  
  <p>Unexpectedly, I found the data is all from development database.</p>
  
  <p>So, I ran into console <code>rails c</code> and <code>RAILS_ENV=production rails c</code> to check what's the problem</p>
  
  <p>I found the instance was created at production mode correctly, but how come in the following methods will pull the data from development mode??</p>
  
  <p>There are Passenger and Nginx run on my server and I run another server by <code>rails server -e production</code> to debug.</p>
  
  <p>Thanks</p>