Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gem install websocket-driver fails on Windows when Ruby is installed in a directory with a parentheses in the directory name #69

Open
GeneHFang opened this issue Feb 11, 2020 · 7 comments

Comments

@GeneHFang
Copy link

Long story short I have Ruby installed in a folder called 'rubystuff(code)', and I ran into a syntax error when trying to bundle install my project that has a websocket-driver dependency.

I reinstalled Ruby into a new folder without parentheses and the bundle install succeeded without issue.

I figure this is an issue with the way this gem is handling directory names, where it's trying to invoke a function called 'rubystuff' where none exists. I have had no issues installing other gems

@jcoglan
Copy link
Collaborator

jcoglan commented Feb 14, 2020

This file contains the entirety of this library's compiler setup:

https://github.com/faye/websocket-driver-ruby/blob/master/ext/websocket-driver/extconf.rb

I don't think I'm doing anything with directory names explicitly, so the failure must be coming from something mkmf is doing. Are you able to investigate this further? I don't have access to a Windows machine myself?

@UltraInstinct05
Copy link

I am not sure if this is the same issue but too seem to can't install this gem on Windows 10. Here's what I get if I try to run gem install websocket-driver in the command prompt with administrator mode.

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

    current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/websocket-driver-0.7.3/ext/websocket-driver
C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0 -r ./siteconf20210417-15820-puespg.rb extconf.rb
creating Makefile

current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/websocket-driver-0.7.3/ext/websocket-driver
make DESTDIR\= clean
current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/websocket-driver-0.7.3/ext/websocket-driver
make DESTDIR\=
make failedNo such file or directory - make

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

@jcoglan
Copy link
Collaborator

jcoglan commented Apr 17, 2021

@Ultra-Instinct-05 That looks like a different problem caused by you not having make installed.

@UltraInstinct05
Copy link

@jcoglan I actually uninstalled Ruby and reinstalled it with the devkit (which probably correctly installed mysys2 and mingw to compile the native gem extensions properly). It now works. Thanks !

@claypooj21
Copy link

I had a similar issue when installing to a directory with a space in the file path. I moved my entire ruby installation from

C:\Program Files\ruby27-x64

into

C:\ruby27-x64

and was able to install websocket-driver 0.7.4 properly using PowerShell as Administrator with

gem install websocket-driver

Unfortunately, I didn't think to copy the gem_make.out file before it was overwritten, but the last couple lines were:

Makefile:270: multiple target patterns. Stop
make failed with exit code 2

I'm guessing make doesn't escape Windows paths correctly, hence the errors. Hope this helps in future troubleshooting.

Windows 10 Home OS build 19041.985
Ruby 2.7.3p183
websocket-driver 0.7.4

@jcoglan
Copy link
Collaborator

jcoglan commented Jun 15, 2021

Is this an ongoing problem or can I close this issue. I'm not able to provide Windows support but here's what I've been responding to most compile issues on this repo:

We don't do anything special with the extension config, we just tell rubygems about it:

For development we use rake-compiler to build.

I'm not able to provide support for OSes other than Ubuntu and macOS, but usually compiler issues aren't to do with this gem specifically but some other problem with the environment gems are being compiled in.

@my130212
Copy link

my130212 commented Mar 7, 2022

请问解决了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants