ERROR: Could not find a valid gem 'bundler' (>= 0)

This seems to only be an issue with MacOS builds. When we try and install ANY gem’s we get the following error: ERROR: Could not find a valid gem 'bundler' (>= 0) followed by: Unable to download data from - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert protocol version (

running gem install GEMNAME on my local machine works without any issues. Please can you assist?

Here is an extract from config.yml where we call the command in question

- run:
    name: Configure Bundler
    command: |
        echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
        source $BASH_ENV
        gem install bundler

Hi Greg,

What version of Xcode are you trying to build on? And what version of Bundler are you trying to install?

On the recent Xcode images, a recent bundler should already be installed – does your project require a very particular version?


Hi Mark,

Thanks, I managed to fix the issue by using a more recent Ruby image. Thanks for the response.