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:
# Install the minor version you want - in this example we're installing 3.1.2: rbenv install 3.1.2 # Set it as your default version of Ruby: rbenv global 3.1.2 rbenv local 3.1.2