title: Rails 4 - how to use sqlite3 in development and PostgreSQL in production w/Heroku
body: <p>I am trying to deploy to Heroku but can't because the default sqlite3 server is still in place.  </p>
  
  <blockquote>
    <p>Detected sqlite3 gem which is not supported on Heroku. 
    <a href="https://devcenter.heroku.com/articles/sqlite3" rel="noreferrer">https://devcenter.heroku.com/articles/sqlite3</a></p>
  </blockquote>
  
  <p>In another tutorial with Rails 3.2.13 I was able to use sqlite3 as the dev db and Postgres as the production db.  The Gemfile looks different in Rails 4 but I have modified it to have this:</p>
  
  <pre><code>group :development do
    # Use sqlite3 as the database for Active Record
    gem 'sqlite3'
  end
  
  group :production do
    gem 'pg'
  end
  </code></pre>
  
  <p>I then changed my database.yml file so that the production section looked like this:</p>
  
  <pre><code>production:
    adapter: postgresql
    database: my_production_database
    pool: 5
    timeout: 5000
  </code></pre>
  
  <p>I then ran <code>bundle install</code> and <code>rake db:create</code> and <code>rake db:migrate</code> but am still unable to push to Heroku.  So I tried <code>rake db:drop</code> as well as <code>rake db:create</code> and <code>rake db:migrate</code> but am still getting the same error message.  </p>
  
  <p>Am I missing something?  What else do I need to do to make sure I'm getting Postgres as my production database and am able to use Heroku?</p>