All Bitrise stacks have Ruby pre-installed, with several different available versions. However, your app's Gemfile might specify a Ruby version that isn't installed on any Bitrise stack and thus certain Steps, such as Run Cocoapods install, might fail.
You can either change your Gemfile and specify an installed Ruby version, or install the correct Ruby version on the virtual machine itself.
To install the version:
1. Add a Script Step to your Workflow.
2. Go to the Script content input.
3. In the input field, add the following:
# uninstall the previously installed ruby version
brew uninstall ruby
# install the minor version you want - in this example we're installing 2.7
brew install firstname.lastname@example.org
# "activate" this version
brew link --force email@example.com