title: Why is my Rails App failing to deploy to AWS Elastic Beanstalk?
body: <p>AWS Elastic Beanstalk never accepts my app when I deploy it to their service. I've tried to fix all issues by reading the log and nothing seems to work. My development IDE is <strong>Rubymine</strong> / <strong>ruby 2.4.5</strong> / <strong>Rails 5.2.0</strong> / <strong>Windows 10 Pro x64</strong> / <strong>Bundler verion 1.16.4</strong>. The error that I am receiving is below. How can I successfully deploy my app to AWS Elastic Beanstalk??
  In development, I have no issues with launching the app whasoever. I tried to launch the app with the fewest dependencies possible. I cleared the assets cache. I removed unnecessary files. Nothing seems to satisfy Elastic Beanstalk. (This is my very first time using the service)</p>
  
  <p><strong>One note</strong>: I am using actioncable for this particular app</p>
  
  <p><strong>database.yml</strong></p>
  
  <pre><code>production:
    adapter: postgresql
    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;
  </code></pre>
  
  <p><strong>cable.yml</strong></p>
  
  <pre><code>development:
    adapter: async
  
  test:
    adapter: async
  
  production:
    adapter: postgresql
    url: &lt;%= ENV["REDIS_URL"] %&gt;
    channel_prefix: &lt;%= ENV['CABLE_CHANNEL_PREFIX'] %&gt;
  </code></pre>
  
  <p><strong>gems</strong></p>
  
  <pre><code>ruby 2.4.5p335 (2018-10-18 revision 65137) [x64-mingw32]
  </code></pre>
  
  <p><strong>Error log</strong>:</p>
  
  <pre><code>-------------------------------------
  /var/log/eb-commandprocessor.log
  -------------------------------------
    gem 'loofah-activerecord'
  
    # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
    gem 'bootsnap', '&gt;= 1.1.0', require: false
    gem 'rails', '5.2.0' # '~&gt;5.1.1' 5.1.6
    # Use postgresql as the database for Active Record
    #gem 'derailed_benchmarks', group: :development
  
    gem 'pg', '~&gt; 1.1', '&gt;= 1.1.4'
    gem 'puma', '~&gt; 2.16'
  
  
    # Use SCSS for stylesheets
    gem 'sass-rails'
    # Use Uglifier as compressor for JavaScript assets
    gem 'uglifier', '~&gt; 4.1', '&gt;= 4.1.20'
  
    # See https://github.com/rails/execjs#readme for more supported runtimes
    # gem 'therubyracer', platforms: :ruby
  
    # Use CoffeeScript for .coffee assets and views
    gem 'coffee-rails', '~&gt; 4.2'
    # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
    # gem 'turbolinks', '~&gt; 5'
    # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
    gem 'jbuilder', '~&gt; 2.5'
    # Use Redis adapter to run Action Cable in production
    gem 'redis'
  
    # Use ActiveModel has_secure_password
    # gem 'bcrypt', '~&gt;3.1.11', platforms: [:ruby, :x64_mingw, :mingw]
    #gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', require: 'bcrypt'
    gem 'bcrypt', '~&gt; 3.1', '&gt;= 3.1.12'
    # Use Capistrano for deployment
    # gem 'capistrano-rails', group: :development
  
    group :test do
      gem 'capybara', '~&gt; 2.15', '&gt;= 2.15.4'
      gem 'factory_bot_rails', '~&gt; 4.0'
      gem 'guard-rspec'
      gem 'rspec-rails', '~&gt; 3.4', '&gt;= 3.4.2'
      gem 'rubocop-rspec'
      gem 'stripe-ruby-mock', '~&gt; 2.5.4', require: 'stripe_mock'
      gem 'webmock'
    end
  
    group :development do
      # Access an IRB console on exception pages or by using &lt;%= console %&gt; anywhere in the code.
      gem 'web-console', '&gt;= 3.3.0'
    end
  
    # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
  
  
    platform :mswin, :mingw, :x64_mingw do
      gem 'tzinfo-data'
      gem 'byebug', platforms: %i[mri mingw x64_mingw], group: :development
    end
  
  
    gem 'rubocop', require: false
    + '[' -d /var/app/ondeck/vendor/cache ']'
    + bundle install --deployment --local
    Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
    installing your bundle as root will break this application for all non-root users on this machine.
    Your bundle only supports platforms ["x64-mingw32"] but your local platforms are
     ["ruby", "x86_64-linux"], and there's no compatible match between those two lists. (Executor::NonZeroExitStatus)
  
  [2019-03-03T05:36:01.585Z] ERROR [27678] : Command CMD-AppDeploy failed!
  [2019-03-03T05:36:01.586Z] INFO  [27678] : Command processor returning results: 
  {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"(TRUNCATED)...ling your bundle as root will break this application for all non-root\nusers on this machine.\nYour bundle only supports platforms [\"x64-mingw32\"] but your local platforms are\n[\"ruby\", \"x86_64-linux\"], and there's no compatible match between those two\nlists. \nHook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI","returncode":16,"events":[]}],"truncated":"true"}
  [2019-03-03T05:39:21.557Z] DEBUG [27906] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
  [2019-03-03T05:39:21.557Z] DEBUG [27906] : Checking if the command processor should execute...
  [2019-03-03T05:39:21.559Z] DEBUG [27906] : Checking whether the command is applicable to instance (i-02c427cad88fc3a3e)..
  [2019-03-03T05:39:21.559Z] INFO  [27906] : Command is applicable to this instance (i-02c427cad88fc3a3e)..
  [2019-03-03T05:39:21.559Z] DEBUG [27906] : Checking if the received command stage is valid..
  [2019-03-03T05:39:21.559Z] INFO  [27906] : No stage_num in command. Valid stage..
  [2019-03-03T05:39:21.560Z] INFO  [27906] : Received command CMD-TailLogs: {"execution_data"=&gt;"*", "instance_ids"=&gt;["i-02c43eeewfefwfw"], "data"=&gt;"betetet--reeetetetete5", "command_name"=&gt;"CMD-TailLogs", "api_version"=&gt;"1.0", "resource_name"=&gt;"AWSEBAutoScalingGroup", "request_id"=&gt;"b100000-2222-2222-2222-22222222"}
  [2019-03-03T05:39:21.560Z] INFO  [27906] : Command processor should execute command.
  [2019-03-03T05:39:21.560Z] DEBUG [27906] : Storing current stage..
  [2019-03-03T05:39:21.560Z] DEBUG [27906] : Stage_num does not exist. Not saving null stage. Returning..
  [2019-03-03T05:39:21.560Z] DEBUG [27906] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
  [2019-03-03T05:39:21.560Z] DEBUG [27906] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
  [2019-03-03T05:39:21.560Z] DEBUG [27906] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
  [2019-03-03T05:39:21.561Z] INFO  [27906] : Found enabled addons: 
  ["logstreaming", "logpublish"].
  [2019-03-03T05:39:21.562Z] INFO  [27906] : Updating Command definition of addon logstreaming.
  [2019-03-03T05:39:21.562Z] INFO  [27906] : Updating Command definition of addon logpublish.
  [2019-03-03T05:39:21.562Z] DEBUG [27906] : Loaded definition of Command CMD-TailLogs.
  [2019-03-03T05:39:21.562Z] INFO  [27906] : Executing CMD-TailLogs
  [2019-03-03T05:39:21.562Z] INFO  [27906] : Executing command: CMD-TailLogs...
  [2019-03-03T05:39:21.562Z] INFO  [27906] : Executing command CMD-TailLogs activities...
  [2019-03-03T05:39:21.562Z] DEBUG [27906] : Setting environment variables..
  [2019-03-03T05:39:21.562Z] INFO  [27906] : Running AddonsBefore for command CMD-TailLogs...
  [2019-03-03T05:39:21.563Z] DEBUG [27906] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
  [2019-03-03T05:39:21.563Z] INFO  [27906] : Running stage 0 of command CMD-TailLogs...
  [2019-03-03T05:39:21.563Z] DEBUG [27906] : Loaded 1 actions for stage 0.
  [2019-03-03T05:39:21.563Z] INFO  [27906] : Running 1 of 1 actions: TailLogs...
  </code></pre>