title: running rake task on 'production' and specifying environment?
body: <p>I have a host at Linode and am trying to run a Rake task on it, but I get a mySQL error saying it can't connect. It looks like it thinks it is on dev. I did some Googling and saw that I can do something like this:</p>
  
  <pre><code>bundle exec rails c
  </code></pre>
  
  <p>It loads the dev environment and I can't run <code>User.all</code> giving me an access denied error. </p>
  
  <p>If I run <code>bundle exec rails c RAILS_ENV=production</code> I get the error:</p>
  
  <pre><code>Rails.env=production database is not configured (ActiveRecord::AdapterNotSpecified)
  </code></pre>
  
  <p>However, if I access it via the web, everything is OK. I was able to run <code>rake db:seed</code> before so I know that there's some way around this. </p>
  
  <p>Accessing mySQL with the production credentials works fine. </p>
  
  <p>Any ideas?</p>