@marc I’m attempting to update to this image (from Xcode 11.0.0) but I’m hitting this error when attempting to install Bundler.
#!/bin/bash --login -eo pipefail
gem install bundler
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Exited with code exit status 1
@robmaceachern Hi Rob, I would suggest switching to one of the included Ruby versions, rather than the system Ruby. The system Ruby gems are installed in /Library/Ruby/Gems/2.6.0 and this directory tends to have more restrictive permissions (you may have to use sudo for example).
Try setting your Ruby version to one of the versions we make available to Chruby:
name: Set Ruby Version
command: echo 'chruby ruby-2.5' >> ~/.bash_profile
With Chruby, gems will be installed in ~/.gem/ruby/2.x.x/gems which, as it is in the user’s own directory does not have restricted permissions.
The version of Ruby we were using (0.5.5) was included on the Xcode 11.0.0 image but it took a while for me to find that it had been changed to 0.5.7 on the latest image. We also re-enabled Ruby autoswitching with the step in this post.