ActiveRecord::NoDatabaseError: Unknown database 'db/production' when running "eb deploy"
<p><strong>Dear subscribers.</strong></p>

<p>I want to create a rails project using amazon RDS mysql db instance.</p>

<h2>WHAT I HAVE DONE.</h2>

<hr>

<pre><code>1) I created amazon RDS mysql instance at first and assigned the full access authority in security group.&lt;br&gt;
2) I have created a rails new project using sqlite and deployed it to amazon elastic beanstalk using "eb deploy". Worked well.&lt;br&gt;
3) In order to use the amazon RDS mysql, I have changed the config/database.yml as the following.&lt;br&gt;

    production:
      adapter: mysql2
      encoding: utf8
      database: &lt;%= ENV['RDS_DB_NAME'] %&gt;
      username: &lt;%= ENV['RDS_USERNAME'] %&gt;
      password: &lt;%= ENV['RDS_PASSWORD'] %&gt;
      host: &lt;%= ENV['RDS_HOSTNAME'] %&gt;
      port: &lt;%= ENV['RDS_PORT'] %&gt;
I have assigned the variables on the tab of configuration in eb instance.&lt;br&gt;
&lt;hr&gt;
</code></pre>

<h2>Errors when deploying it again using "eb deploy"</h2>

<hr>

<pre><code>    ERROR: [Instance: i-0c11ecd4] Command failed on instance. Return code: 1 Output: (TRUNCATED)...options.
    ============= END WARNING FROM mysql2 =========
    rake aborted!
    ActiveRecord::NoDatabaseError: Unknown database 'db/production'

    Mysql2::Error: Unknown database 'db/production'

    Tasks: TOP =&gt; db:migrate
    (See full trace by running task with --trace). 
    Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
    INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
    ERROR: Unsuccessful command execution on instance id(s) 'i-0c11ecd4'. Aborting the operation.
    ERROR: Failed to deploy application.                                

    ERROR: Failed to deploy application.

I want to know the quick way to fix.
</code></pre>

<p>Thanks</p>