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

如何解决bundle install时eventmachine (1.2.7)安装失败问题

解决eventmachine (1.2.7)安装失败问题

An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue.

In Gemfile:
github-pages was resolved to 228, which depends on
jekyll-avatar was resolved to 0.7.0, which depends on
jekyll was resolved to 3.9.3, which depends on
em-websocket was resolved to 0.5.3, which depends on
eventmachine

  • 先安装编译依赖:
    • macOS:执行 xcode-select --install 安装Xcode命令行工具,确保具备基础编译环境
    • Debian/Ubuntu:执行 sudo apt-get install build-essential libssl-dev 安装编译套件和SSL依赖库
  • 指定eventmachine的SSL编译参数(适用于macOS用Homebrew安装openssl的场景):
    先执行 bundle config build.eventmachine --with-openssl-dir=$(brew --prefix openssl@1.1),再重新运行 bundle install
  • 若上述方法无效,单独安装兼容版本的eventmachine:
    执行 gem install eventmachine -v 1.2.7 -- --with-openssl-dir=$(brew --prefix openssl@1.1),安装完成后再执行 bundle install
  • 检查Ruby版本:github-pages 228适配Ruby 2.7.x或3.0.x,若当前Ruby版本过高(如3.2+),用rbenv/rvm切换到兼容版本后重试
  • 清理Bundle缓存:执行 bundle clean --force 清除旧缓存文件,再重新执行 bundle install

内容的提问来源于stack exchange,提问作者Jorden Sanchez

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.12 07:28:18