-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Recurring uninitialized constant JSON::Ext::ParserConfig
error
#19553
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
Comments
Closing as these reproduction instructions don't work and you're personally unblocked here it seems. Please correct me if wrong. |
I'm not sure what you mean by "personally unblocked". I cannot run I would add that this was also reported by two other people in the Discussions, but there was no solution: https://github.com/orgs/Homebrew/discussions/5874 The error is definitely reproducible for me (i.e. even after purging vendors directory). You're correct that the reproduction steps I've given are unlikely to work for you, but I don't know what other factors contribute to this problem. If you have suggestions I'm happy to test and report back. |
@mahrud can you try to uninstall/reinstall Homebrew? |
Yes, but same issue: $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew
==> The following new directories will be created:
/home/linuxbrew/.linuxbrew/bin
/home/linuxbrew/.linuxbrew/etc
/home/linuxbrew/.linuxbrew/include
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/sbin
/home/linuxbrew/.linuxbrew/share
/home/linuxbrew/.linuxbrew/var
/home/linuxbrew/.linuxbrew/opt
/home/linuxbrew/.linuxbrew/share/zsh
/home/linuxbrew/.linuxbrew/share/zsh/site-functions
/home/linuxbrew/.linuxbrew/var/homebrew
/home/linuxbrew/.linuxbrew/var/homebrew/linked
/home/linuxbrew/.linuxbrew/Cellar
/home/linuxbrew/.linuxbrew/Caskroom
/home/linuxbrew/.linuxbrew/Frameworks
Press RETURN/ENTER to continue or any other key to abort:
[sudo] password for mahrud:
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chmod ug=rwx /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chmod go-w /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions
==> /usr/bin/sudo /bin/chown mahrud /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/chgrp mahrud /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/var /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var/homebrew /home/linuxbrew/.linuxbrew/var/homebrew/linked /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Caskroom /home/linuxbrew/.linuxbrew/Frameworks
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew/Homebrew
==> /usr/bin/sudo /bin/chown -R mahrud:mahrud /home/linuxbrew/.linuxbrew/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 296340, done.
remote: Counting objects: 100% (182/182), done.
remote: Compressing objects: 100% (136/136), done.
remote: Total 296340 (delta 82), reused 90 (delta 46), pack-reused 296158 (from 3)
remote: Enumerating objects: 55, done.
remote: Counting objects: 100% (33/33), done.
remote: Total 55 (delta 33), reused 33 (delta 33), pack-reused 22 (from 1)
==> Updating Homebrew...
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run these commands in your terminal to add Homebrew to your PATH:
echo >> /home/mahrud/.bashrc
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/mahrud/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
- Install Homebrew's dependencies if you have sudo access:
sudo dnf group install development-tools
For more information, see:
https://docs.brew.sh/Homebrew-on-Linux
- We recommend that you install GCC:
brew install gcc
- Run brew help to get started
- Further documentation:
https://docs.brew.sh
mahrud@noether:~$ brew style flint
Warning: style is a developer command, so Homebrew's
developer mode has been automatically turned on.
To turn developer mode off, run:
brew developer off
==> Installing 'bundler' gem
Fetching bundler-2.5.20.gem
Fetching gem metadata from https://rubygems.org/.......
Fetching public_suffix 6.0.1
Fetching ast 2.4.2
Fetching base64 0.2.0
Fetching bindata 2.5.0
Installing base64 0.2.0
Installing ast 2.4.2
Fetching concurrent-ruby 1.3.5
Installing bindata 2.5.0
Installing public_suffix 6.0.1
Fetching json 2.10.2
Installing json 2.10.2 with native extensions
Fetching language_server-protocol 3.17.0.4
Installing concurrent-ruby 1.3.5
Installing language_server-protocol 3.17.0.4
Fetching lint_roller 1.1.0
Installing lint_roller 1.1.0
Fetching parallel 1.26.3
Installing parallel 1.26.3
Fetching racc 1.8.1
Installing racc 1.8.1 with native extensions
Fetching plist 3.7.2
Installing plist 3.7.2
Fetching rainbow 3.1.1
Installing rainbow 3.1.1
Fetching regexp_parser 2.10.0
Installing regexp_parser 2.10.0
Fetching ruby-progressbar 1.13.0
Installing ruby-progressbar 1.13.0
Fetching unicode-emoji 4.0.4
Fetching ruby-macho 4.1.0
Installing unicode-emoji 4.0.4
Installing ruby-macho 4.1.0
Fetching sorbet-runtime 0.5.11945
Installing sorbet-runtime 0.5.11945
Fetching warning 1.5.0
Installing warning 1.5.0
Fetching addressable 2.8.7
Installing addressable 2.8.7
Fetching elftools 1.3.1
Installing elftools 1.3.1
Fetching unicode-display_width 3.1.4
Fetching patchelf 1.5.1
Installing unicode-display_width 3.1.4
Installing patchelf 1.5.1
Fetching parser 3.3.7.1
Installing parser 3.3.7.1
Fetching rubocop-ast 1.39.0
Installing rubocop-ast 1.39.0
Fetching rubocop 1.74.0
Installing rubocop 1.74.0
Fetching rubocop-md 2.0.0
Fetching rubocop-performance 1.24.0
Fetching rubocop-rspec 3.5.0
Fetching rubocop-sorbet 0.9.0
Installing rubocop-md 2.0.0
Installing rubocop-performance 1.24.0
Installing rubocop-sorbet 0.9.0
Installing rubocop-rspec 3.5.0
Bundle complete! 42 Gemfile dependencies, 30 gems now installed.
Bundled gems are installed into `../linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle`
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/json-2.10.2/lib/json/ext.rb:32:in `<module:Ext>': uninitialized constant JSON::Ext::ParserConfig (NameError)
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/json-2.10.2/lib/json/ext.rb:8:in `<module:JSON>'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/json-2.10.2/lib/json/ext.rb:5:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/json-2.10.2/lib/json.rb:586:in `<module:JSON>'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/json-2.10.2/lib/json.rb:584:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-1.74.0/lib/rubocop/formatter/json_formatter.rb:3:in `<top (required)>'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-1.74.0/lib/rubocop/formatter.rb:19:in `require_relative'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-1.74.0/lib/rubocop/formatter.rb:19:in `<module:Formatter>'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-1.74.0/lib/rubocop/formatter.rb:5:in `<module:RuboCop>'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-1.74.0/lib/rubocop/formatter.rb:3:in `<top (required)>'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-1.74.0/lib/rubocop.rb:761:in `require_relative'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/rubocop-1.74.0/lib/rubocop.rb:761:in `<top (required)>'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/rubocop.rb:9:in `block in <main>'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/warnings.rb:29:in `ignore'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11945/lib/types/private/methods/call_validation.rb:282:in `bind_call'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11945/lib/types/private/methods/call_validation.rb:282:in `validate_call'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11945/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/rubocop.rb:8:in `<main>' |
Do you have any bundle configuration in e.g. |
I had a cache directory, which I cleared off and purged vendor directory, but it didn't help. |
Do you have a |
I do not! This is the contents of the json-2.10.2 directory:
Thanks for the help! |
Ok this is likely caused by Fedora's configuration of Ruby: https://src.fedoraproject.org/rpms/ruby/blob/rawhide/f/operating_system.rb#_154. This isn't necessarily going to be easy to workaround:
We'll likely do all of the above I reckon, but it won't be a quick fix (particularly the first two). However you can fix this in the meantime by setting |
Ah, spot on! The quick workaround works, thank you very much! |
For the record, ArchLinux suffer from the same issue for quite some time. |
Don't see where they do their config, but Arch Linux has extra problems anyway where they don't ship the entire standard library together for some reason. Though those type of issues could/should be checked in |
Are you talking about the ruby config? https://gitlab.archlinux.org/archlinux/packaging/packages/ruby/-/blob/main/PKGBUILD?ref_type=heads |
I hit this same issue on my M3 Mac.
I uninstalled and re-installed Homebrew, and then could get the config.
|
19553 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Uh oh!
There was an error while loading. Please reload this page.
brew doctor
outputNow, if I do the following:
I get:
Verification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputAfter the same workaround as above, I get:
What were you trying to do (and why)?
This issue seems to be happening during various brew calls, such as audit, style, bump-formula-pr, ...
What happened (include all command output)?
What did you expect to happen?
Brew to create a update PR, or show the output of
brew style
.Step-by-step reproduction instructions (by running
brew
commands)Here is another instance, demonstrating the the error is not specific to one formula. I first clean up the vendor directory and call
brew update
, everything is normal, then:The text was updated successfully, but these errors were encountered: