Unable to deploy Rails API app to AWS Elastic Beanstalk

Viewed 364

I've followed this tutorial to a tee on how to deploy a Rails API with RDS to Elastic Beanstalk, and it's all working until the very last step of deploying the application. Everytime I try and deploy I see that health is degraded and it crashes. I am deploying manually instead of using the AWS EB CLI tools. I am using a mac. I checked the last 100 lines of the log and this is the only error I see:

[ERROR] An error occurred during execution of command [app-deploy] - [stage ruby application]. Stop running the command. Error: install dependencies in Gemfile failed with error Command /bin/sh -c bundle config set --local deployment true failed with error exit status 1. Stderr:rbenv: version `ruby-2.6.1' is not installed (set by /var/app/staging/.ruby-version)

When I try and deploy, the messages I get are these:

Unsuccessful command execution on instance id(s) 'i-0f99244af00c70eb0'. Aborting the operation.

During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.

Environment health has transitioned from Info to Degraded. Command failed on all instances. Incorrect application version found on all instances. Expected version "Sample Application" (deployment 13). Application update failed 13 seconds ago and took 77 seconds.

I really need to get this to work, any help would be greatly appreciated!

1 Answers
Related