尝试安装 gem websocket-driver-0.7.3 时出错

Error when trying to install gem websocket-driver-0.7.3

当我尝试安装 websocket-driver-0.7.3 gem 时,我在 CMD 上收到此消息:

Fetching websocket-driver 0.7.3
Installing websocket-driver 0.7.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/websocket-driver-0.7.3/ext/websocket-driver
C:/Ruby27-x64/bin/ruby.exe -I C:/Ruby27-x64/lib/ruby/2.7.0 -r
./siteconf20201109-15264-1prb1qx.rb extconf.rb
creating Makefile

current directory:
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/websocket-driver-0.7.3/ext/websocket-driver
make "DESTDIR=" clean
current directory:
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/websocket-driver-0.7.3/ext/websocket-driver
make "DESTDIR="
make failedNo such file or directory - make "DESTDIR="

Gem files will remain installed in
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/websocket-driver-0.7.3 for inspection.
Results logged to
C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/websocket-driver-0.7.3/gem_make.out

我正在使用 ruby 2.7.0。请帮忙!

根据 github repo 上的类似问题,您应该执行以下操作:

  • 安装 MSYS2 DevKit
  • 运行 ridk install

有关详细信息,请参阅 github 上的 the issue

和 ruby installer 为 windows。

rvm 安装ruby-3.0.1 --with-gcc