我已經嘗試了很多不同的方法來安裝 Rails,但一直沒有找到一種可行的方法。我已經避免采用 WSL 方式,因為我的作業系統驅動器已接近容量,但如果我在這里找不到解決方案,我計劃嘗試這樣做。
使用我當前的設定,我無法編譯websocket_mask.c.
我目前采用的流程是由 John Elder 指導的,RailsInstaller用于獲取一堆依賴項,然后從https://rubyinstaller.org/升級 Ruby 和 Devkit ,然后gem install rails升級到最新版本的 Rails。
當我運行時gem install rails,我遇到了以前在make: gcc: No such file or directory .
current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/websocket-driver-0.7.5/ext/websocket-driver
make DESTDIR\=
generating websocket_mask-x64-mingw-ucrt.def
compiling websocket_mask.c
make: gcc: No such file or directory
make: *** [Makefile:246: websocket_mask.o] Error 127
make failed, exit code 2
我按照本指南gcc在 Windows 上安裝。我又跑gem install rails了,現在有了
current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/websocket-driver-0.7.5/ext/websocket-driver
make DESTDIR\=
generating websocket_mask-x64-mingw-ucrt.def
compiling websocket_mask.c
websocket_mask.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
#include <ruby.h>
make: *** [Makefile:246: websocket_mask.o] Error 1
make failed, exit code 2
我本可以在過去的嘗試中發誓,我已經過了這一點并且能夠安裝 Rails 并繼續出現錯誤rails new,但我認為這個錯誤可能出現在其他一些成功訊息之上,我繼續。rails -v即使安裝出錯,也會生成最新版本。
我認為這一切都與安裝導軌時的rails new錯誤有關,但我記得過去msgpack在某個時間點和sprockets-rails另一個點引發了相關的錯誤。
uj5u.com熱心網友回復:
今天早上,我在安裝 RubyInstaller Ruby Devkit 3.1.1-1 (x64) 時遇到了同樣的錯誤。
我決定為 Windows 10 安裝較舊的 RubyInstaller 版本 Ruby Devkit 3.0.3-1 (x64),我再也沒有看到這個錯誤。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/443727.html
上一篇:Hash#dig未按預期進行評估
