首页 > 解决方案 > 安装rails时构建websocket-driver时出错

问题描述

尝试安装rails时出现以下错误gem install rails

C:\Windows\system32>gem install rails
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing rails:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20200126-10756-4x6n18.rb extconf.rb
creating Makefile

current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
make "DESTDIR=" clean

current directory: C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
make "DESTDIR="
generating websocket_mask-x64-mingw32.def
compiling websocket_mask.c
make: *** [Makefile:244 : websocket_mask.o] Erreur 1

make failed, exit code 2

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

我在 Windows 7 x64 上运行,我Ruby+Devkit 2.6.5-1 (x64)https://rubyinstaller.org/downloads/安装

我确实安装了安装程序附带的 devkit 并更新了系统。我花了几个小时试图弄清楚发生了什么,并阅读了其他类似的错误(通常在 .c 文件中有更明确的消息或编译错误),但我的想法已经不多了。

标签: ruby-on-railsinstallation

解决方案


推荐阅读