Closed scpeters closed 7 years ago
Closing this for now but will investigate further if it crops up more. CC @reitermarkus this may be another argument for using bundler for more of this stuff.
I just had this gem issue pop again on a system running 10.11, though it wasn't after an OS upgrade. It initially was failing only with test-bot
during bottle builds, though it didn't fail from direct calls of brew audit
or brew style
. On an impulse, I deleted the ~/.gem
folder, and then it failed with manual calls to brew audit
and brew style
. I managed to fix it by running brew tests
.
Here's some of the console error messages I was seeing (though it's now fixed).
==> brew audit osrf/simulation/ignition-fuel-tools1 --online
==> FAILED
Error: Could not find 'parallel' (~> 1.10) among 15 total gem(s)
Checked in 'GEM_PATH=/Users/jenkins/workspace/generic-release-homebrew_bottle_builder-elcapitan/home/.gem/ruby/2.3.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/gems/2.3.0:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0', execute `gem env` for more information
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1439:in `block in activate_dependencies'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `each'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `activate_dependencies'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1410:in `activate'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems.rb:196:in `rescue in try_activate'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems.rb:193:in `try_activate'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:125:in `rescue in require'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
/usr/local/Homebrew/Library/Homebrew/cmd/style.rb:74:in `check_style_impl'
/usr/local/Homebrew/Library/Homebrew/cmd/style.rb:67:in `check_style_json'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:103:in `audit'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
$ brew doctor
Your system is ready to brew.
$ brew config
HOMEBREW_VERSION: 1.5.2-40-ga44b21b
ORIGIN: https://github.com/Homebrew/brew
HEAD: a44b21b2dfd229c10a0c748c4f06e8ab6520f898
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 8571096379e0c2507e22ccf5c9ecd4af44f2ffe9
Core tap last commit: 41 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
CPU: octa-core 64-bit ivybridge
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 8.0 build 800
Git: 2.10.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.43.0 => /usr/bin/curl
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_131, 1.8.0_77
macOS: 10.11.6-x86_64
Xcode: 8.2.1
CLT: 8.2.0.0.1.1480973914
X11: 2.7.11 => /opt/X11
After deleting ~/.gem
:
$ brew style libyaml
Error: Could not find 'parallel' (~> 1.10) among 15 total gem(s)
Checked in 'GEM_PATH=/Users/jenkins/.gem/ruby/2.3.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/gems/2.3.0:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.3.0', execute `gem env` for more information
Please report this bug:
https://docs.brew.sh/Troubleshooting.html
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1439:in `block in activate_dependencies'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `each'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1428:in `activate_dependencies'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/specification.rb:1410:in `activate'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems.rb:196:in `rescue in try_activate'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems.rb:193:in `try_activate'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:125:in `rescue in require'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
/usr/local/Homebrew/Library/Homebrew/cmd/style.rb:74:in `check_style_impl'
/usr/local/Homebrew/Library/Homebrew/cmd/style.rb:61:in `check_style_and_print'
/usr/local/Homebrew/Library/Homebrew/cmd/style.rb:55:in `style'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
but then brew tests
got everything installed properly again.
If removing ~/.gem
doesn't work, then
rm -rf "$(brew --repo)"/Library/Homebrew/vendor
git -C "$(brew --repo)" checkout .
should work.
tl;dr I had a problem, found a solution, posting the solution here. Maintainers may close this issue if they don't think there's anything else to do.
Please always follow these steps:
brew
command and notbrew install
ing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at the relevant tap e.g. for Homebrew/homebrew-core https://github.com/Homebrew/homebrew-core/issues/newbrew update
and retried your prior step?brew doctor
, fixed all issues and retried your prior step?brew config
andbrew doctor
and included their output with your issue?I was trying to audit a formula (ie.
brew audit boost
).This normally works of course, and and it works on one of my 3 CI machines, but 2 of 3 were failing to find the rainbow gem when invoking
brew audit
directly (brew test-bot
doesn't have this problem):I realized that the two machines experiencing this problem had recently had OS upgrades (to 10.12 and 10.13). Our 10.11 machine hasn't had a major OS upgrade and still works fine. Renaming the
~/.gem
folder to~/.gem_old
fixed the problem for me. Deleting it is an option as well, but it is at your own risk. I may also have a problem with environment variables I suppose.I searched for this error message and wasn't able to find anyone else who had this problem. I was expecting an issue like this to exist so people could see the problem and a possible solution. I suppose a
brew doctor
complaint could be helpful as well or araise
message saying that the~/.gem
folder may be out of date if the OS is upgraded.Step-by-step reproduction instructions (by running
brew
commands)~/.gem
brew audit boost
I haven't tried reproducing this since I figured out the solution, so I don't know if it will still happen or if it was a transient issue from when I upgraded my machines (in the month before High Sierra was released). You can close the issue if you don't want to take further action, but I can help debug this further or work on a pull request to document the issue, as I still have the old
~/.gem
folder on one of my CI machines.