title: Rails gives error when using PostgreSQL
body: <p>I am trying to use PostgreSQL instead of SQLite3 for my Rails app because PostgreSQL is required by Heroku, where I want to deploy the app. Starting my app with the Postgres flag (i.e., <code>--databse=postgresql</code>) works fine. However, after adding <code>gem twitter-boostrap-rails</code> to my <code>Gemfile</code> and running <code>bundle install</code> I get this error about SQLite3:</p>
  
  <blockquote>
  <pre><code>active_record/connection_adapters/connection_specification.rb:190:in
  </code></pre>
    
    <p><code>rescue in spec': Specified 'sqlite3' for database adapter, but the
    gem is not loaded. Add</code>gem 'sqlite3'` to your Gemfile (and ensure its
    version is at the minimum required by ActiveRecord)</p>
  </blockquote>
  
  <p>Here is my <code>Gemfile</code>:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem "therubyracer"
  gem "less-rails"
  gem "twitter-bootstrap-rails"
  
  
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
  gem 'rails', '4.1.4'
  # Use postgresql as the database for Active Record
  gem 'pg'
  # Use SCSS for stylesheets
  gem 'sass-rails', '~&gt; 4.0.3'
  # Use Uglifier as compressor for JavaScript assets
  gem 'uglifier', '&gt;= 1.3.0'
  # Use CoffeeScript for .js.coffee assets and views
  gem 'coffee-rails', '~&gt; 4.0.0'
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer',  platforms: :ruby
  
  # Use jquery as the JavaScript library
  gem 'jquery-rails'
  # Turbolinks makes following links in your web application faster.              
  gem 'turbolinks'
  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
  gem 'jbuilder', '~&gt; 2.0'
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', '~&gt; 0.4.0',          group: :doc
  
  # Spring speeds up development by keeping your application running in the background.   
  gem 'spring',        group: :development
  
  # Use ActiveModel has_secure_password
  # gem 'bcrypt', '~&gt; 3.1.7'
  
  # Use unicorn as the app server
  # gem 'unicorn'
  
  # Use Capistrano for deployment
  # gem 'capistrano-rails', group: :development
  
  # Use debugger
  # gem 'debugger', group: [:development, :test]
  
  gem 'rails_12factor', group: :production&gt;
  </code></pre>
  
  <p>And here is my <code>database.yml</code>:</p>
  
  <pre><code>----------
  
  
  # PostgreSQL. Versions 8.2 and up are supported.
  #
  # Install the pg driver:
  #   gem install pg
  # On OS X with Homebrew:
  #   gem install pg -- --with-pg-config=/usr/local/bin/pg_config
  # On OS X with MacPorts:
  #   gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
  # On Windows:
  #   gem install pg
  #       Choose the win32 build.
  #       Install PostgreSQL and put its /bin directory on your path.
  #
  # Configure Using Gemfile
  # gem 'pg'
  #
  default: &amp;default
    adapter: postgresql
    encoding: unicode
    # For details on connection pooling, see rails configuration guide
    # http://guides.rubyonrails.org/configuring.html#database-pooling
    pool: 5
  
  development:
    &lt;&lt;: *default
  </code></pre>
  
  <p>Why am I getting this error, and how do I fix the problem?</p>