title: Heroku: database configuration does not specify adapter
body: <p>I have an app deployed in heroku that uses postgresql as database. I have created a new model that will connect to a remote mysql database like the following:</p>
  
  <pre><code># other_database.rb(apps/models/)
  class OtherDatabase &lt; ActiveRecord::Base
    self.abstract_class = true
    establish_connection "remote_#{Rails.env}"
  end
  
  # other_model.rb(apps/models/)
  class OtherModel &lt; OtherDatabase
    self.table_name = "users"
  end
  </code></pre>
  
  <p>i have also edited the database.yml file and added these entries:</p>
  
  <pre><code>remote_development:
    adapter: mysql2
    encoding: utf8
    reconnect: false
    database: app_development
    pool: 5
    username: root
    password:
    socket: /var/run/mysqld/mysqld.sock
  
  remote_production:
    adapter: mysql2
    encoding: utf8
    reconnect: true
    database: app_production
    pool: 40
    username: root
    password: secretpassword
    socket: /var/run/mysqld/mysqld.sock
    host: 12.34.56.78
  </code></pre>
  
  <p>The remote database uses mysql as its database.</p>
  
  <p>It works fine in my local machine, but when I deploy it to heroku, it creates an error page so I looked up on the heroku logs, and I found this one out:</p>
  
  <pre><code>/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/connection_specification.rb:52:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
  from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/connection_specification.rb:46:in `resolve_string_connection'
  </code></pre>
  
  <p>I am spent almost all my time searching for some answers but to no avail. Hope anyone can help out with this issue.</p>
  
  <p>TIA.</p>
  
  <p>Eralph</p>