title: On heroku, rake db:migrate fails with "database configuration does not specify adapter"
body: <p>I've followed the <a href="http://ruby.railstutorial.org/chapters/a-demo-app?version=3.2#sec%3adeploying_the_demo_app" rel="nofollow">Rails Tutorial</a> up to the linked point. </p>
  
  <p>Here's the shell output:</p>
  
  <pre><code>jrhorn424 at hook in ~/Learning/rails/rails-tutorial/demo_app on master
  $ heroku run rake db:migrate          
  Running rake db:migrate attached to terminal... up, run.2
  
  ### Snip ###
  
  Migrating to CreateUsers (20120310145100)
  Migrating to CreateMicroposts (20120311052021)
  rake aborted!
  database configuration does not specify adapter
  
  Tasks: TOP =&gt; db:schema:dump
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>I've consulted the <a href="http://devcenter.heroku.com/articles/rails3#rake" rel="nofollow">Heroku quick start</a>, and done a bit of Googling. I suspected the problem was with <code>config/database.yml</code> since that is full of references to <code>sqlite3</code> in my development environment. However, on the server, the same file includes these lines, among others:</p>
  
  <pre><code>adapter = uri.scheme
  adapter = "postgresql" if adapter == "postgres"
  </code></pre>
  
  <p>Adding data through the deployed application succeeds, but running <code>heroku run rake db:migrate</code> still fails.</p>
  
  <p>Here's my Gemfile: </p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '3.2.2'
  
  # Bundle edge Rails instead:
  # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git'
  
  group :development do
      gem 'sqlite3', '1.3.5'
  end
  
  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
    gem 'sass-rails',   '3.2.4'
    gem 'coffee-rails', '3.2.2'
  
    # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    # gem 'therubyracer'
  
    gem 'uglifier', '1.2.3'
  end
  
  gem 'jquery-rails', '2.0.0'
  
  group :production do
      gem 'pg', '0.12.2'
  end
  </code></pre>