Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew installing one, specific Homebrew/homebrew-core formula (not cask or tap) and not every time you run brew? If it's a general brew problem please file this issue at https://github.com/Homebrew/brew/issues/new. If it's a brew cask problem please file this issue at https://github.com/caskroom/homebrew-cask/issues/new. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update and retried your prior step?brew doctor, fixed all issues and retried your prior step?brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?Basically, the changes in 16ebe5f1843e6cb54856311ff0f676be53007329 of changing to squiggly heredocs breaks Homebrew for anyone who's running a version of Ruby prior to 2.3. For people who are using the base version of Ruby on OSX (2.0.0), this is going to cause adverse affects.
For context, one of the devs I work with was trying to update docker-machine-driver-xhyve and got this:
Error: docker-machine-driver-xhyve: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/docker-machine-driver-xhyve.rb:64: syntax error, unexpected <<
def caveats; <<~EOS
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/docker-machine-driver-xhyve.rb:66: syntax error, unexpected '\n', expecting '='
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
You've checked the box
If brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
but you haven't included the output of config and doctor.
Homebrew vendors Ruby 2.3 on < macOS High Sierra. If you're having a problem, it's because your Homebrew is outdated, which those would show.
I also get this error when trying to install ruby. It seems I can't because I have an old ruby to start with. I've also tried rvm but it appears to use homebrew under the hood (judging by the requirements error message).
My actual error
Error: ruby: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ruby.rb:146: syntax error, unexpected <<, expecting keyword_end
def rubygems_config(api_version); <<~EOS
Any pointers on where to proceed?
brew config:
HOMEBREW_VERSION: 1.3.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: 05bb3532fc3f0d723a8e8af1605c3f8080051e78
Last commit: 6 weeks ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: ab7c27374b32aa0a39425506a37e19eb35662c52
Core tap last commit: 13 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.0.0-p648
Clang: 8.1 build 802
Git: 2.11.0 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.6.0_65-b14-468
macOS: 10.12.5-x86_64
Xcode: 8.3.3
CLT: 9.0.0.0.1.1504363082
X11: N/A
brew doctor
Your system is ready to brew.
git -C "$(brew --repo)" fetch --tags
brew update --force
Awesome thanks, now have 2.4 installed
Most helpful comment
git -C "$(brew --repo)" fetch --tags
brew update --force