You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ventura 13.3 Intel Mac执行bundle install时sorbet-static版本匹配失败

解决Ventura 13.3 Intel Mac上bundle install sorbet-static 0.5.9019的平台不匹配问题

问题核心是:Ventura 13.3对应universal-darwin-22平台,但sorbet-static 0.5.9019没有发布该平台的构建包;而旧版macOS对应universal-darwin-21有可用包,且Intel架构向下兼容,可通过以下方式解决:

方法1:强制Bundler忽略平台限制安装

直接执行带参数的bundle install命令,让Bundler跳过平台校验,安装兼容的universal-darwin-21版本:

bundle install --force-ruby-platform

或者提前配置全局参数,再执行install:

bundle config set force_ruby_platform true
bundle install

方法2:手动下载并安装兼容gem包

  1. 下载对应平台的sorbet-static包:
gem fetch sorbet-static -v 0.5.9019 --platform universal-darwin-21
  1. 本地安装下载好的gem文件:
gem install ./sorbet-static-0.5.9019-universal-darwin-21.gem
  1. 执行bundle install,Bundler会优先使用本地已安装的兼容版本。

方法3:临时修改Gemfile.lock指定平台

如果团队允许修改锁文件,找到Gemfile.lock里的sorbet-static条目,将平台字段改为universal-darwin-21,保存后再执行bundle install。注意需和团队同步该修改,避免后续协作冲突。

内容的提问来源于stack exchange,提问作者Jason FB

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 14:15:18