When using setup-ruby, on ubuntu, bundler is not installed, and can be installed by gem install bundler.
But on macos, bundler is available by default, but also breaks if you try to install it using gem install bundler.
Can we just have it installed by default?
@ioquatix
JFYI, given the Ruby versions available on Actions, updating RubyGems works on macOS, and it installs Bundler...
Trying to install bundler on macos:

If you don't install bundler on linux:

@ioquatix did you managed to get past error installing bundler conflict on mac os?
Nope.
I disabled it.
Okay I tried again and it's still not working.
We could just follow travis's lead and make sure bundler is installed by default. Pretty much everyone testing ruby is going to need it, or can just ignore it.
Workaround:
- name: Install dependencies
run: |
command -v bundler || gem install bundler
bundle install
Bundler has only been included as a default gem from Ruby 2.6 (https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/), in those screenshots macOS is using version 2.6 but Ubuntu 2.3.
It鈥檚 so critical it should just be installed by default.
I'm going to move this to the virtual environments repo since that control what's on the images by default.
https://github.com/eregon/use-ruby-action installs Bundler by default for versions which don't already have it.
But it's an interesting question a general which version of Bundler should be provided.
For use-ruby-action it's currently Bundler 1.x for Ruby <= 2.6 (2.6 ships with Bundler 1) and Bundler 2 for Ruby 2.7 (2.7 ships with it).
@ioquatix bundler has to be included now. Could you check it, please?
@miketimofeev thanks for your effort. I am now using a different workflow so not affected by this, but I'm glad it's now the default as I'm sure it is logical and will save time for future users!
Most helpful comment
Workaround: