Had the same problem.
It’s indeed related to this https://github.com/Homebrew/brew/pull/3240/files sent above.
Just insert a - brew update on your dependencies: pre: and you will be fine.
It will, as informed in a comment in this PR, “unset HOMEBREW_RUBY_PATH to ensure that this doesn’t “stick” on a Ruby 2.0 version after a portable Ruby has been installed.”.
You can continue to use the 8.2 image, also there’s no need to change the Ruby version.
How were you setting the machine version? Through the config like below?
machine:
ruby:
version: "2.3.1"
The 8.3.3 Xcode image has ruby 2.3.4 installed, so try updating it to version: "2.3.4". You can read more about what software versions are available in each of our OSX image docs here. If you’re using a Xcode image different from 8.3.3 you can check the docs to see what ruby version is available in your image.
These answers seem to be all for Circleci 1.0 - But the easy workaround in every case is just to do a
brew update
before doing anything else with homebrew. So in Circleci 2.0 in your step that is installing something from homebrew, you can just do the brew update first.