I've been trying to figure out how to deploy a simple rails app to elastic beanstalk using the cli on my macOS, but every time I get to eb create I get this error:
2020/08/06 07:22:56.626563 [INFO] Executing instruction: StageApplication
2020/08/06 07:22:56.626674 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
2020/08/06 07:22:56.626695 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2020/08/06 07:22:56.638657 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2020/08/06 07:22:56.640331 [INFO] Executing instruction: RunAppDeployPreBuildHooks
2020/08/06 07:22:56.640351 [INFO] The dir .platform/hooks/prebuild/ does not exist in the application. Skipping this step...
2020/08/06 07:22:56.640356 [INFO] Executing instruction: stage ruby application
2020/08/06 07:22:56.640360 [INFO] stage ruby application ....
2020/08/06 07:22:56.640386 [INFO] Running command /bin/sh -c bundle config set --local deployment true
2020/08/06 07:22:56.669550 [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.7.0' is not installed (set by /var/app/staging/.ruby-version)
And then I run eb terminate so that I don't get charged for anything. The error just says I don't have 2.7.0 installed even though my Gemfile lists 2.7.1 and I ran bundle install without any issues.
For the eb platform version I selected the first option listed here, so that would be Ruby 2.7.1-p83, which is what my ruby -v currently returns so I'm not sure why it's looking for 2.7.0...
I used rvm in order to update to the latest Ruby, previously I had Ruby 2.6.3 and the error at the bottom said 'ruby-2.6.3' is not installed'. It was difficult to use rbenv to update to the latest version of Ruby on my mac, I think because it had issues with my systems version of Ruby? So I removed rbenv from brew and started using rvm instead. But I feel this is where the problem lies, since it looks like elastic beanstalk is using rbenv to try and find the correct version of Ruby?
Stderr:rbenv: version `ruby-2.7.0' is not installed
Any help or direction would be appreciated, even just an understanding of what ".ruby-version" is or if rvm shouldn't be used for deployment.