ruby 在您的gem文件中列出的或此计算机上可用的任何gem源中找不到gem 'wdm(>= 0.1.0)x64-mingw 32

cgvd09ve  于 2023-02-21  发布在  Ruby
关注(0)|答案(3)|浏览(215)

当我在Git Bash上运行Jekyll serve时,我收到以下警告:

Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?

添加宝石文件后,我得到另一个错误消息。

Could not find gem 'wdm (>= 0.1.0) x64-mingw32' in any of the gem sources
listed in your Gemfile or available on this machine.

我试着安装Ruby Devkit来解决这个问题,但最终只得到了以下错误消息。

$ ruby dk.rb install
[INFO] Skipping existing gem override for 'C:/Ruby200-x64'
[WARN] Skipping existing DevKit helper library for 'C:/Ruby200-x64'

$ gem install json --platform=ruby
ERROR: Error installing json:
The 'json' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
wdebmtf2

wdebmtf21#

您需要在将wdm gem添加到Gemfile后运行bundle install以下载它。

l2osamch

l2osamch2#

您以前似乎安装过devkit,它跳过了新安装,请尝试

ruby dk.rb install --force
l7wslrjt

l7wslrjt3#

下载后需要将wdm添加到bundle中。请尝试
bundle add wdm

相关问题