title: Deploy Ruby on Rails App to Heroku with mysql database
body: <p>I'm having issues with deploying my Ruby on Rails app onto Heroku.  I've set it up to the point where I would like to run the following command:</p>
  
  <pre><code>git push heroku master
  </code></pre>
  
  <p>Unfortunately, when I run the command I get an error that prevents me from pushing the whole app.  The main line that stands out is:</p>
  
  <pre><code>Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
  </code></pre>
  
  <p>I don't use 'postgresql', I use mysql for my database adapter so I'm pretty sure adding the pg gem won't solve this issue.  Where us this database adapter Specified for the database adapter?</p>
  
  <p>Here is my config/database.yml file:</p>
  
  <pre><code># MySQL.  Versions 5.0+ are recommended.
  #
  # Install the MYSQL driver
  #   gem install mysql2
  #
  # Ensure the MySQL gem is defined in your Gemfile
  #   gem 'mysql2'
  #
  # And be sure to use new-style password hashing:
  #   http://dev.mysql.com/doc/refman/5.0/en/old-client.html
  #
  default: &amp;default
    adapter: mysql2
    encoding: utf8
    pool: 5
    database: homeworkdb
    username: root
    password: malbec32
    host: localhost
    # socket: /var/run/mysqld/mysqld.sock
  
  development:
    &lt;&lt;: *default
    database: homework_development
  
  # Warning: The database defined as "test" will be erased and
  # re-generated from your development database when you run "rake".
  # Do not set this db to the same as development or production.
  test:
    &lt;&lt;: *default
    database: homework_test
  
  # As with config/secrets.yml, you never want to store sensitive information,
  # like your database password, in your source code. If your source code is
  # ever seen by anyone, they now have access to your database.
  #
  # Instead, provide the password as a unix environment variable when you boot
  # the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
  # for a full rundown on how to provide these environment variables in a
  # production deployment.
  #
  # On Heroku and other platform providers, you may have a full connection URL
  # available as an environment variable. For example:
  #
  #   DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
  #
  # You can use this database configuration with:
  #
  #   production:
  #     url: &lt;%= ENV['DATABASE_URL'] %&gt;
  #
  production:
    &lt;&lt;: *default
    database: homework_production
    username: homework
    password: &lt;%= ENV['HOMEWORK_DATABASE_PASSWORD'] %&gt;
  </code></pre>
  
  <p>I also have the following lines in my Gemfile:</p>
  
  <pre><code>group :production do 
      gem 'mysql2'
  end
  gem 'mysql2'
  </code></pre>
  
  <p>If anybody can see anything not right in this or if you need more information then please speak up, thanks :)</p>