The only officially supported way to change the Ruby version on CircleCI macOS machines is to use chruby. We ship chruby and various Ruby versions already configured with every Xcode image.
You can find out how to use chruby to switch Rubies in our documentation.
Common Issues with rbenv
We highly suggest switching to chruby, as above, due to its simplicity, but here are a few common rbenv issues and some pointers on how to resolve them.
You installed a gem, such as fastlane, but when you run it the version is older than the version you just installed.
This is a common issue with rbenv due to the way it installs gems using shims. If these shims are not updated, then they will continue to point to an older version of the gem. To resolve this issue run the command rbenv rehash to update these - more information can be found here.
Comments
Article is closed for comments.