- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在尝试安装或升级某些 brew 软件包时遇到了 类 SpecificationPolicy 的父类(super class)不匹配
错误。
例如,更新安装 supabase CLI 时(brew install supabase/tap/supabase
):
==> Installing supabase from supabase/tap
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:12: warning: already initialized constant Gem::VERSION
/Library/Ruby/Site/2.6.0/rubygems.rb:11: warning: previous definition of VERSION was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/compatibility.rb:14: warning: already initialized constant Gem::RubyGemsVersion
/Library/Ruby/Site/2.6.0/rubygems/compatibility.rb:15: warning: previous definition of RubyGemsVersion was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/compatibility.rb:18: warning: already initialized constant Gem::RbConfigPriorities
/Library/Ruby/Site/2.6.0/rubygems/compatibility.rb:18: warning: previous definition of RbConfigPriorities was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/compatibility.rb:27: warning: constant Gem::ConfigMap is deprecated
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/compatibility.rb:35: warning: constant Gem::ConfigMap is deprecated
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/defaults.rb:3: warning: already initialized constant Gem::DEFAULT_HOST
/Library/Ruby/Site/2.6.0/rubygems/defaults.rb:3: warning: previous definition of DEFAULT_HOST was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:117: warning: already initialized constant Gem::RUBYGEMS_DIR
/Library/Ruby/Site/2.6.0/rubygems.rb:115: warning: previous definition of RUBYGEMS_DIR was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:122: warning: already initialized constant Gem::WIN_PATTERNS
/Library/Ruby/Site/2.6.0/rubygems.rb:129: warning: previous definition of WIN_PATTERNS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:131: warning: already initialized constant Gem::GEM_DEP_FILES
/Library/Ruby/Site/2.6.0/rubygems.rb:138: warning: previous definition of GEM_DEP_FILES was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:141: warning: already initialized constant Gem::REPOSITORY_SUBDIRECTORIES
/Library/Ruby/Site/2.6.0/rubygems.rb:148: warning: previous definition of REPOSITORY_SUBDIRECTORIES was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:153: warning: already initialized constant Gem::REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES
/Library/Ruby/Site/2.6.0/rubygems.rb:161: warning: previous definition of REPOSITORY_DEFAULT_GEM_SUBDIRECTORIES was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:162: warning: already initialized constant Gem::READ_BINARY_ERRORS
/Library/Ruby/Site/2.6.0/rubygems.rb:169: warning: previous definition of READ_BINARY_ERRORS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:172: warning: already initialized constant Gem::WRITE_BINARY_ERRORS
/Library/Ruby/Site/2.6.0/rubygems.rb:174: warning: previous definition of WRITE_BINARY_ERRORS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:185: warning: already initialized constant Gem::LOADED_SPECS_MUTEX
/Library/Ruby/Site/2.6.0/rubygems.rb:181: warning: previous definition of LOADED_SPECS_MUTEX was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1345: warning: already initialized constant Gem::MARSHAL_SPEC_DIR
/Library/Ruby/Site/2.6.0/rubygems.rb:1319: warning: previous definition of MARSHAL_SPEC_DIR was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/version.rb:157: warning: already initialized constant Gem::Version::VERSION_PATTERN
/Library/Ruby/Site/2.6.0/rubygems/version.rb:157: warning: previous definition of VERSION_PATTERN was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/version.rb:158: warning: already initialized constant Gem::Version::ANCHORED_VERSION_PATTERN
/Library/Ruby/Site/2.6.0/rubygems/version.rb:158: warning: previous definition of ANCHORED_VERSION_PATTERN was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:17: warning: already initialized constant Gem::Requirement::OPS
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:12: warning: previous definition of OPS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:27: warning: already initialized constant Gem::Requirement::SOURCE_SET_REQUIREMENT
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:22: warning: previous definition of SOURCE_SET_REQUIREMENT was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:30: warning: already initialized constant Gem::Requirement::PATTERN_RAW
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:25: warning: previous definition of PATTERN_RAW was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:35: warning: already initialized constant Gem::Requirement::PATTERN
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:30: warning: previous definition of PATTERN was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:40: warning: already initialized constant Gem::Requirement::DefaultRequirement
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:35: warning: previous definition of DefaultRequirement was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/requirement.rb:314: warning: already initialized constant Gem::Version::Requirement
/Library/Ruby/Site/2.6.0/rubygems/requirement.rb:311: warning: previous definition of Requirement was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/platform.rb:198: warning: already initialized constant Gem::Platform::RUBY
/Library/Ruby/Site/2.6.0/rubygems/platform.rb:204: warning: previous definition of RUBY was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/platform.rb:204: warning: already initialized constant Gem::Platform::CURRENT
/Library/Ruby/Site/2.6.0/rubygems/platform.rb:210: warning: previous definition of CURRENT was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:9: warning: already initialized constant Gem::StubSpecification::PREFIX
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:9: warning: previous definition of PREFIX was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:12: warning: already initialized constant Gem::StubSpecification::OPEN_MODE
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:12: warning: previous definition of OPEN_MODE was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:18: warning: already initialized constant Gem::StubSpecification::StubLine::NO_EXTENSIONS
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:18: warning: previous definition of NO_EXTENSIONS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:21: warning: already initialized constant Gem::StubSpecification::StubLine::REQUIRE_PATHS
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:21: warning: previous definition of REQUIRE_PATHS was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/stub_specification.rb:31: warning: already initialized constant Gem::StubSpecification::StubLine::REQUIRE_PATH_LIST
/Library/Ruby/Site/2.6.0/rubygems/stub_specification.rb:31: warning: previous definition of REQUIRE_PATH_LIST was here
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification_policy.rb:4:in `<top (required)>': superclass mismatch for class SpecificationPolicy (TypeError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:16:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1365:in `<module:Gem>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:116:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /usr/local/Homebrew/Library/Homebrew/utils/gems.rb:47:in `setup_gem_environment!'
from /usr/local/Homebrew/Library/Homebrew/standalone/load_path.rb:13:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in `<main>'
Error: Failure while executing; `/usr/bin/sandbox-exec -f /private/tmp/homebrew20221102-2820-wkxj9g.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -W1 -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/supabase/homebrew-tap/supabase.rb` exited with 1.
我注意到在不同的库 brew upgrade heroku
上执行 brew upgrade
时也会发生此错误。
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification_policy.rb:4:in `<top (required)>': superclass mismatch for class SpecificationPolicy (TypeError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:16:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1365:in `<module:Gem>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:116:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /usr/local/Homebrew/Library/Homebrew/utils/gems.rb:47:in `setup_gem_environment!'
from /usr/local/Homebrew/Library/Homebrew/standalone/load_path.rb:13:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in `require_relative'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in `<main>'
Error: Failure while executing; `/usr/bin/sandbox-exec -f /private/tmp/homebrew20221102-5824-12bp753.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -W1 -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/heroku/homebrew-brew/Formula/heroku-node.rb` exited with 1.
我正在使用 rvm 来管理我的 ruby 版本,which ruby
提供 /Users/username/.rvm/rubies/ruby-3.0.0/bin/ruby
.所以不确定错误日志中的“Ruby.framework/Versions/2.6”来自哪里。
似乎是 Homebrew 和 ruby 之间的问题。可能与最新的 xcode 和 MacOS Ventura 更新有关(此错误的其他报告 here 和 here)?
有人有任何想法或解决了这个问题吗?
最佳答案
我遇到了 this ,这表明要“正确清理系统 Ruby”,可以运行:
sudo rm -rf \
/Library/Ruby/Gems/2.6.0/{build_info,cache,doc,extensions,gems} \
/Library/Ruby/Gems/2.6.0/specifications/*.gemspec \
/Library/Ruby/Site
我这样做了,重新运行上面的 brew
命令,错误消失了!
不确定到底发生了什么,也许升级 xcode 和/或 MacOS Ventura 搞乱了系统 Ruby 安装,上面的命令“清理”了它。还不清楚为什么 which ruby
指向 rvm 安装的更新的 ruby 版本,但通过 Homebrew 安装某些软件包似乎正在调用 Mac 的系统 Ruby (2.6.0)。 🤷
关于ruby - 类 SpecificationPolicy 的父类(super class)不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74294323/
问题比较Java,但是我想在Android中实现: 假设有 3 个或更多类相互扩展: class A { ... int color; ... } class B extend
我知道标题听起来有点奇怪,但这正是我愿意做的。简单解释:A类是B类的子类,B类也是C类的子类>. 现在,所有这些类都包含方法m()。在我的 A 类中,这是我唯一可以访问的类,因为其他类仅在运行时可用,
我有一个 UIViewController 类 A 和 B。 A 使用以下方式加载 B:[A.view addSubView B.view]。 B 有一个带有“后退”按钮的导航栏。我想在单击时返回到
我有以下(第三方)类结构。我们将调用第三方项目 ProjectSeriously,并注意我使用 System.out.println 代替其他复杂的功能(100 行代码) . class A {
在下面的代码中,我从 Game 扩展了 MyGame。我有两个问题: 我们是否需要为所有render()、dispose()、pause()调用super方法 和 resize(w,h)?很多人都没有
例如,假设我想在调用 super.viewDidLoad() 时跳过一级。所以我希望能够做这样的事情: override func viewDidLoad() { super.super.vi
public class Faculty extends Employee { public static void main(String[] args) { new Fac
假设我有: class Superclass { //fields... methodA() {...} methodB() {...} ... } class Subclass exte
这个问题在这里已经有了答案: Why is super.super.method(); not allowed in Java? (22 个答案) 关闭 9 年前。 我怀疑我想做的事情是否可行。我有
我有一个实现 Initializable 的类。 public abstract class ExampleClass implements Initializable { public vo
我想知道,我有这个大数组,是否可以只在内存中使用一次而不是每个线程一次?以 stackoverflow 上的标签为例。他们几乎从不改变,为什么不为他们留下一个内存点呢?甚至可能将该数组永久保存在内存中
假设这三个类具有这个简单的层次结构: class A { func foo() { print("A") } } class B: A { override fu
有没有办法在 TypeScript 中调用 super.super.methodName。我想避免调用super.methodName,但我想调用二祖的methodName方法。 谢谢。 最佳答案 T
这个问题已经有答案了: When do I use super()? (11 个回答) 已关闭 7 年前。 package Geometry; public abstract class Geomet
我必须执行and()在我的实现 Predicate 的业务对象上. 出现问题的代码是 and() 行调用: Predicate predicate = new M
我有一个实现接口(interface)的抽象父类(super class): public abstract class FooMatrix implements Matrix { publi
我有四个 UIView:viewA 是 Root View ,它有 viewB 作为它的 subview 。 viewB 将 viewC 作为其 subview ,而 viewC 将 viewD 作为
有什么区别: class Child(SomeBaseClass): def __init__(self): super(Child, self).__init__() 和:
我有一个通用接口(interface) interface ListList extends List> .由于某些原因,我无法转换 ListList至 List> .有什么方法可以做到吗?为什么它不
我想调用带有两个参数的父类(super class)的构造函数,所以我调用了 super(arguments),但是编译器说: “类 Person 中的构造函数 Person 不能应用于给定类型; 要
我是一名优秀的程序员,十分优秀!