Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby errors on every brew upgrade #10688

Closed
1 task done
RyanSinger opened this issue Feb 23, 2021 · 5 comments
Closed
1 task done

Ruby errors on every brew upgrade #10688

RyanSinger opened this issue Feb 23, 2021 · 5 comments
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@RyanSinger
Copy link

brew config output

➜ ~ brew config
Ignoring commonmarker-0.17.13 because its extensions are not built. Try: gem pristine commonmarker --version 0.17.13
Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
Ignoring ffi-1.11.1 because its extensions are not built. Try: gem pristine ffi --version 1.11.1
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Ignoring nokogiri-1.10.10 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.10
Ignoring nokogiri-1.10.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.8
Ignoring unf_ext-0.0.7.7 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.7
HOMEBREW_VERSION: 3.0.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: b712bcc
Last commit: 33 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 43bda13
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 12.0 build 1200
Git: 2.30.1 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.2.1-x86_64
CLT: 12.4.0.0.1.1610135815
Xcode: 12.4

brew doctor output

➜ ~ brew doctor
Ignoring commonmarker-0.17.13 because its extensions are not built. Try: gem pristine commonmarker --version 0.17.13
Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
Ignoring ffi-1.11.1 because its extensions are not built. Try: gem pristine ffi --version 1.11.1
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Ignoring nokogiri-1.10.10 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.10
Ignoring nokogiri-1.10.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.8
Ignoring unf_ext-0.0.7.7 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.7
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
lua@5.1


  • The brew doctor above contains no "Warning" lines.

What were you trying to do (and why)?

I regularly run brew upgrade to keep my system up to date. Recently started getting these errors. Installing these packages with Gem install doesn't fix it.

What happened (include all command output)?

➜ ~ brew upgrade
Ignoring commonmarker-0.17.13 because its extensions are not built. Try: gem pristine commonmarker --version 0.17.13
Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
Ignoring ffi-1.11.1 because its extensions are not built. Try: gem pristine ffi --version 1.11.1
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Ignoring nokogiri-1.10.10 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.10
Ignoring nokogiri-1.10.8 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.8
Ignoring unf_ext-0.0.7.7 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.7
➜ ~

What did you expect to happen?

upgrade to run smoothly without errors.

Step-by-step reproduction instructions (by running brew commands)

brew upgrade

@RyanSinger RyanSinger added the bug Reproducible Homebrew/brew bug label Feb 23, 2021
@carlocab
Copy link
Member

See #10675.

@RyanSinger
Copy link
Author

Thanks @carlocab ; removing those gems using gem uninstall didn't fix it. Not sure what to try next.

@Samasaur1
Copy link

I've been having the same issue, and I think I have the answer.

My suspicion is that the listed gems were installed on an old version of Ruby. In my case, as best I can tell, they came with the system Ruby 2.3.0, and I believe a macOS update caused these errors to start appearing. You can verify this by running sudo mv /Library/Ruby/Gems /Library/Ruby/_Gems, then running a brew command to check. NOTE: WHILE I DON'T THINK THAT THIS WILL HARM YOUR COMPUTER, ESPECIALLY IF YOU UNDO IT WITH sudo mv /Library/Ruby/_Gems /Library/Ruby/Gems, IT MAY HARM YOUR COMPUTER. I made sure I had a Time Machine backup and the willingness to deal with any problems I caused before trying this.

If temporarily renaming that folder fixed your problem, then I feel pretty confident that your problem is with these old gems that for some reason no longer have their extensions built. I'm not sure where to go from here — using /usr/bin/gem uninstall <GEMNAME> only uninstalls Ruby 2.6 gems, and my problem is with Ruby 2.3 gems. Furthermore, Homebrew says that it still uses Ruby 2.6.3 (on both your and my computers), so I don't want to remove gems willy-nilly. I assume it should be safe to remove these gems with /usr/bin/gem uninstall <GEM_NAME>, but your mileage may vary.

@Samasaur1
Copy link

To summarize, the steps I took were to run /usr/bin/gem uninstall <GEM_NAME> for all the gems that were in /Library/Ruby/Gems/2.6.0/gems/ (my gems are installed globally; yours may not be).

I only use Ruby for Jekyll, Jazzy, and Homebrew, and all three of those things worked afterwards, and I no longer get errors, so that was enough for me. Someone who actually knows anything about Ruby may be able to find a better solution.

@Bo98
Copy link
Member

Bo98 commented Feb 26, 2021

I've merged some changes which should fix this. Unless there's some issues, it will be a part of Homebrew 3.0.3.

@Bo98 Bo98 closed this as completed Feb 26, 2021
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Mar 29, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Mar 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

5 participants