title: ActiveRecord::NoEnvironmentInSchemaError
body: <p>I'm trying to perform database related operations on my newly upgraded app(Rails 5) and I'm unable to perform destructive database commands locally.<br>
  <code>rails db:reset</code> or <code>rails db:drop</code> .</p>
  
  <p>The trace results with the following data,</p>
  
  <pre><code>rails db:drop --trace
  ** Invoke db:drop (first_time)
  ** Invoke db:load_config (first_time)
  ** Execute db:load_config
  ** Invoke db:check_protected_environments (first_time)
  ** Invoke environment (first_time)
  ** Execute environment
  ** Invoke db:load_config
  ** Execute db:check_protected_environments
  
  rails aborted!
  ActiveRecord::NoEnvironmentInSchemaError: 
  
  Environment data not found in the schema. To resolve this issue, run: 
  
      bin/rails db:environment:set RAILS_ENV=development
  </code></pre>
  
  <p>What I've tried so far are,</p>
  
  <ol>
  <li>Setting <code>bin/rails db:environment:set RAILS_ENV=development</code>, doesn't change anything still the error occurs.</li>
  <li>Setting Environment variable manually to development.</li>
  </ol>
  
  <p>None of these helped. I'm Looking for a fix or workaround.</p>