Deploy faling with error: Ruby ruby-2.7.2 is not installed

We use s3 deploy for one of our builds. It suddenly stopped working a couple of hours ago with the following error.

DEPRECATION WARNING! We are moving to dpl v.2. If you want to preserve the current behavior and still use dpl v.1, add the dpl_version key with the desired version of the dpl gem (the last stable is 1.10.16) to your .travis.yml.

0.35s$ rvm 2.7 --fuzzy do ruby -S gem install dpl -v 1.10.16

Ruby ruby-2.7.2 is not installed.

The command "rvm 2.7 --fuzzy do ruby -S gem install dpl -v 1.10.16" failed and exited with 2 during .

Please help

I got the same error message. I was able to solve it by explicitly installing Ruby in the “before_deploy” phase. I just added these two lines to the .travis.yml file:

  - rvm install 2.7