Brew: 'brew cask style --fix' doesn't work on macOS Mojave

Created on 28 Sep 2018  路  7Comments  路  Source: Homebrew/brew

Problem:
No native extension can be built for Mojave system bundled ruby. And brew uses that by default.

  • [x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • [x] ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew config and brew doctor and included their output with your issue?

  • brew config
    HOMEBREW_VERSION: 1.7.6 ORIGIN: https://github.com/Homebrew/brew HEAD: f239b7a62790cfb4f33bda9aab7597d43f1b1e3b Last commit: 9 days ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: 72b19d28d6107dff677df6334cfa951e565784d1 Core tap last commit: 2 days ago HOMEBREW_PREFIX: /usr/local HOMEBREW_GIT: git HOMEBREW_MACOS_VERSION_NUMERIC: 101400 CPU: quad-core 64-bit skylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.17.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git Curl: 7.54.0 => /usr/bin/curl Java: N/A macOS: 10.14-x86_64 CLT: 10.0.0.0.1.1535735448 CLT headers: N/A Xcode: 10.0 XQuartz: N/A

  • brew doctor
    Your system is ready to brew.

Steps to reproduce:

  1. Fresh macOS Mojave install
  2. Latest brew install
  3. Do brew cask style --fix google-chrome
  4. Get this garbage:

==> Installing or updating 'rubocop-cask' gem
Building native extensions. This could take a while...
ERROR: Error installing rubocop-cask:
ERROR: Failed to build gem native extension.

current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180928-14992-x1rx8s.rb extconf.rb
creating Makefile

current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
make "DESTDIR=" clean

current directory: /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1/ext/jaro_winkler
make "DESTDIR="
make: * No rule to make target /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed byadj_matrix.o'. Stop.

make failed, exit code 2

Gem files will remain installed in /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/jaro_winkler-1.5.1 for inspection.
Results logged to /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.1/gem_make.out
Error: Failed to install/update the 'rubocop-cask' gem.

Compiler expects header file in: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h
But actual directory with header is: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17/ruby/config.h

outdated stale

Most helpful comment

Care to try brew vendor-install ruby? Solved some issues for me regarding jaro_winkler.

All 7 comments

Care to try brew vendor-install ruby? Solved some issues for me regarding jaro_winkler.

Care to try brew vendor-install ruby? Solved some issues for me regarding jaro_winkler.

Thanks, works perfectly fine now!
Maybe add a note for Mojave users? Although would be better if apple fixed it.

Glad to hear. 馃憤 I suspect that this issue reside only with Homebrew.

From the issue template:

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 do not read fill out the issue template repeatedly you will be blocked from ever submitting issues to Homebrew again.

If you add the necessary information to this issue (don't create a new one, please) then this issue may be reopened.

Sorry but it didn't seem like necessity in this case.

So before running brew vendor-install ruby

  • [x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • [x] ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew config and brew doctor and included their output with your issue?

  • brew config
    HOMEBREW_VERSION: 1.7.6 ORIGIN: https://github.com/Homebrew/brew HEAD: f239b7a62790cfb4f33bda9aab7597d43f1b1e3b Last commit: 9 days ago Core tap ORIGIN: https://github.com/Homebrew/homebrew-core Core tap HEAD: 72b19d28d6107dff677df6334cfa951e565784d1 Core tap last commit: 2 days ago HOMEBREW_PREFIX: /usr/local HOMEBREW_GIT: git HOMEBREW_MACOS_VERSION_NUMERIC: 101400 CPU: quad-core 64-bit skylake Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby Clang: 10.0 build 1000 Git: 2.17.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git Curl: 7.54.0 => /usr/bin/curl Java: N/A macOS: 10.14-x86_64 CLT: 10.0.0.0.1.1535735448 CLT headers: N/A Xcode: 10.0 XQuartz: N/A

  • brew doctor
    Your system is ready to brew.

Sorry but it didn't seem like necessity in this case.

Let us decide that, please.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rotonen picture Rotonen  路  4Comments

hktalent picture hktalent  路  4Comments

vitahlin picture vitahlin  路  4Comments

JustinTArthur picture JustinTArthur  路  3Comments

JaKXz picture JaKXz  路  3Comments