title: Rails app fails to deploy on elastic beanstalk
body: <p>I have a Rails 4 app using ruby 2.3 that I want to deploy using AWS Ebs. I'm pointing the db connection to an existing db, I'm using the cli to initialize and create. When I get to the create part i keep getting an error message that says:</p>
  
  <p><code>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.</code></p>
  
  <p>Which of course means the migration failed. When i checked the logs it says tables already exist, I did some research and found you can include settings in <code>.ebextensions/</code> to specify not to run migrations or run bundle on test and dev. Here is my <code>.ebextensions/ruby-settings.config</code>:</p>
  
  <p><code>option_settings:
          BUNDLE_WITHOUT: "test:development"
          RAILS_ENV: production
          RACK_ENV: production
          RAILS_SKIP_MIGRATIONS: true
  </code></p>
  
  <p>However it still fails to deploy and gives the same error message. Question is, what am i doing wrong here? I've tried rewriting this config file different ways based on tutorials i found on this <a href="https://ruby.awsblog.com/post/Tx2AK2MFX0QHRIO/Deploying-Ruby-Applications-to-AWS-Elastic-Beanstalk-with-Git" rel="nofollow">blog</a> and the AWS docs page <a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions-optionsettings.html" rel="nofollow">here</a>.</p>
  
  <p>Any thoughts on what I'm doing wrong are helpful as i am at a loss currently.</p>