Home > Enterprise >  Windows rails installation failing, currently on websocket mask compilation -- `make: *** [Makefile:
Windows rails installation failing, currently on websocket mask compilation -- `make: *** [Makefile:

Time:03-15

I have tried a bunch of different ways to get Rails to install and haven't been able to find one that works. I have refrained from going the WSL way because my OS drive is nearly at capacity, but I plan to try that if I can't find a solution here.

With my current setup, I am failing on the compilation of websocket_mask.c.

Current process I took was one directed by John Elder to use RailsInstaller to get a bunch of the dependencies, then upgrade Ruby and Devkit from https://rubyinstaller.org/, then gem install rails to upgrade to the latest version of Rails.

When I ran gem install rails, I encountered an error I'd seen before in 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

I followed this guide on installing gcc on windows. I ran gem install rails again and now have

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

I could have sworn in a past attempt that I got past this point and was able to install Rails and proceed to errors in rails new, but I think it's possible this error had appeared above some other success messages and I proceeded. rails -v produces the most current version even with an error in installation.

I think it's all tied to this error in installing rails, but I remember in the past that rails new threw errors related to msgpack at one point and sprockets-rails at another.

CodePudding user response:

This morning, I got the same error when I installed RubyInstaller Ruby Devkit 3.1.1-1 (x64).

I decided to install the version older RubyInstaller version Ruby Devkit 3.0.3-1 (x64) for Windows 10, and I did not see this error anymore.

  • Related