title: run a script in production
body: <p>I would like to run a script in production.  This script generates a record and inserts it into the production db.  My problem is that the script tries to insert the record into the development db.</p>
  
  <p>run_report.rb</p>
  
  <pre><code> ENV['RAILS_ENV'] = 'production'
   require 'rubygems'
   require 'daemons'
  
   Daemons.run('report.rb')
  </code></pre>
  
  <p>report.rb</p>
  
  <pre><code> ENV['RAILS_ENV'] = 'production'
   ...
    @r = Report.new(:info =&gt; @info)
    @r.save
  </code></pre>
  
  <p>I've tried:
  script/rails runner run_report.rb start</p>
  
  <p>script/rails runner run_report.rb start production</p>