title: AWS EB Deploy ERROR: Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 18
body: <p>I'm getting this error when trying to deploy a new version using eb deploy.  It appears as if the new git version is being uploaded.  However, it's not being deployed correctly.  I can also show the config files for the environment.  I'm not exactly sure where to look.  I've searched many places to find out.  Thanks,</p>
  
  <pre><code>eb deploy
  Creating application version archive "v0_9_2-78-g5ed5".
  Uploading ujoin-www/v0_9_2-78-g5ed5.zip to S3. This may take a while.
  Upload Complete.
  INFO: Environment update is starting.                               
  INFO: Deploying new version to instance(s).                         
  ERROR: Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 18
  ERROR: [Instance: i-2ad238d5 Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed
  .
  INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
  INFO: New application version was deployed to running EC2 instances.
  ERROR: Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.
  
  ERROR: Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.
  vipul$ eb deploy --debug
  2015-05-11 11:06:27,291 (DEBUG) eb : logging initialized for 'eb' using LoggingLogHandler
  2015-05-11 11:06:27,291 (DEBUG) cement.ext.ext_plugin : plugin config dir /etc/eb/plugins.d does not exist.
  2015-05-11 11:06:27,292 (DEBUG) cement.ext.ext_plugin : plugin config dir /Users/vipul/.eb/plugins.d does not exist.
  2015-05-11 11:06:27,294 (DEBUG) eb : collecting arguments/commands for &lt;ebcli.core.base.EbBaseController object at 0x10e633950&gt;
  2015-05-11 11:06:27,298 (DEBUG) eb : collecting arguments/commands for &lt;ebcli.controllers.deploy.DeployController object at 0x10e6387d0&gt;
  -- EBCLI Version: 3.4
  -- Python Version: 2.7.6 (default, Sep  9 2014, 15:04:36) 
  [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
  2015-05-11 11:06:27,304 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,514 (DEBUG) ebcli.objects.sourcecontrol : Git Version: git version 2.2.0
  2015-05-11 11:06:27,754 (DEBUG) ebcli.objects.sourcecontrol : git symbolic-ref result: refs/heads/master
  2015-05-11 11:06:27,755 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,758 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,761 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,771 (DEBUG) ebcli.objects.sourcecontrol : Git Version: git version 2.2.0
  2015-05-11 11:06:27,777 (DEBUG) ebcli.objects.sourcecontrol : git symbolic-ref result: refs/heads/master
  2015-05-11 11:06:27,777 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,780 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,783 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,786 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,790 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,802 (DEBUG) ebcli.objects.sourcecontrol : Git Version: git version 2.2.0
  2015-05-11 11:06:27,812 (DEBUG) ebcli.objects.sourcecontrol : git symbolic-ref result: refs/heads/master
  2015-05-11 11:06:27,813 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:27,818 (DEBUG) ebcli.lib.aws : Creating new Botocore Session
  2015-05-11 11:06:27,818 (DEBUG) ebcli.lib.aws : Botocore version: 0.93eb
  2015-05-11 11:06:27,820 (DEBUG) ebcli.lib.aws : Creating new Botocore Client for elasticbeanstalk
  2015-05-11 11:06:28,013 (DEBUG) ebcli.lib.aws : Successfully created session for elasticbeanstalk
  2015-05-11 11:06:28,013 (INFO) eb : Deploying code to ujoin-stage-green in region us-east-1
  2015-05-11 11:06:28,013 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:28,029 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:28,233 (DEBUG) ebcli.objects.sourcecontrol : git diff --numstat result:  with errors: 
  2015-05-11 11:06:28,233 (INFO) eb : Getting version label from git with git-describe
  2015-05-11 11:06:28,505 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:28,509 (DEBUG) ebcli.core.fileoperations : Project root found at: /Users/vipul/Sites/ujoin-www
  2015-05-11 11:06:28,509 (DEBUG) ebcli.lib.elasticbeanstalk : Inside get_application_versions api wrapper
  2015-05-11 11:06:28,510 (DEBUG) ebcli.lib.aws : Making api call: (elasticbeanstalk, describe_application_versions) to region: us-east-1 with args:{'ApplicationName': 'ujoin-www'}
  </code></pre>