I am trying to deploy a Rails 6 app on AWS via Elastic Beanstalk.
When I run eb deploy, it fails.
When I look at the logs, I see this message
2020/06/03 14:19:51.457403 [ERROR] rbenv: version `2.7.0' is not installed (set by /var/app/staging/.ruby-version)
2020/06/03 14:19:51.457439 [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 `2.7.0' is not installed (set by /var/app/staging/.ruby-version)
However, when I eb ssh and run ruby -v I see that I am running ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
So I updated my Gemfile and .ruby-version to ruby 2.7.1 to match my AWS environment.
When I cd /var/app/staging
and cat .ruby-version
I get 2.7.1
So why is this deploy failing? I am not requiring ruby 2.7.0 anywhere in my project.
I've made sure to git push, so I know my Gemfile is pushed my to repo.
I am going crazy trying to get this Rails App deployed.