Windows10(x64)下Jekyll启动报错:无法找到wdm (~>0.1.1) gem
解决Windows10下Jekyll运行时wdm gem缺失问题
检查并修改项目Gemfile
打开项目根目录的Gemfile,确认是否包含以下依赖声明:gem 'wdm', '~> 0.1.1', :platforms => [:mingw, :mswin, :x64_mingw]如果没有,手动添加后保存;若存在
Gemfile.lock文件,直接删除它,避免缓存冲突。重新执行bundle安装
切换到项目根目录,执行以下命令:bundle install --full-index若仍失败,指定官方gem源重试:
bundle install --source https://rubygems.org/确认Ruby环境一致性
- 执行
ruby -v,确保当前使用的是Ruby 3.3.0版本,若版本不符,切换到对应版本(使用rbenv/chruby等版本工具的话)。 - 执行
Get-Command bundle(PowerShell)或which bundle(Git Bash),确认bundle属于当前Ruby版本的安装路径,避免多版本Ruby混用导致gem无法被识别。
- 执行
手动安装wdm并更新bundle依赖
执行以下命令强制安装指定版本的wdm:gem install wdm -v 0.1.1 --platform=ruby回到项目目录更新bundle依赖:
bundle update wdm测试启动命令
执行带trace参数的启动命令,方便排查剩余问题:bundle exec jekyll serve --trace
内容的提问来源于stack exchange,提问作者Alexis_008
相关产品推荐
相关产品推荐

