faye / websocket-driver-ruby

WebSocket protocol handler with pluggable I/O
Other
223 stars 43 forks source link

ERROR: Failed to build gem native extensions #54

Closed tmerrr closed 7 years ago

tmerrr commented 7 years ago

Hi, I've been trying to install Rails and it keeps failing when trying to install Websocket Driver.

Thought I would try:

gem install websocket-driver

on it's own, to try and sort the issue. But getting the same error message. Please see below:

Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing websocket-driver: ERROR: Failed to build gem native extension.

C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20170904-8880-66a54a.rb extconf.rb

creating Makefile

make "DESTDIR=" clean

make "DESTDIR=" generating websocket_mask-x64-mingw32.def compiling websocket_mask.c make: x86_64-w64-mingw32-gcc: Command not found make: *** [websocket_mask.o] Error 127

make failed, exit code 2

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

jcoglan commented 7 years ago

Hi @tmerrr, unfortunately I'm not much a Windows expert so I'm not sure what you or I might need to do to get this to compile. It might be worth asking on the Ruby or Rails mailing lists or other support channels, and in the meantime I'll see if I can find anyone who can help.

tmerrr commented 7 years ago

Thanks for your response @jcoglan. I've actually managed to now fix the issue. Basically I had downloaded and installed the MSYS2 DevKit but wasn't aware that I then needed to run ridk install to make it work.

In case anyone else is having this issue, there is a good walk through on https://github.com/oneclick/rubyinstaller2.