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

Automatic setting of BUNDLE_GEMFILE fails on Windows #840

Closed
blm768 opened this issue Jul 27, 2023 · 0 comments · Fixed by #841
Closed

Automatic setting of BUNDLE_GEMFILE fails on Windows #840

blm768 opened this issue Jul 27, 2023 · 0 comments · Fixed by #841
Labels
bug Something isn't working

Comments

@blm768
Copy link

blm768 commented Jul 27, 2023

Ruby version

3.2.2

Code snippet

Gemfile:

source 'https://rubygems.org'

Description

On Windows, if BUNDLE_GEMFILE isn't externally defined, the command that ruby-lsp runs to invoke itself within the bundle will fail. It looks like it's using shell syntax that the default shell on Windows doesn't support.

In a directory with the above Gemfile and a fresh installation of ruby-lsp:

C:\Users\REDACTED\Dev\ruby-test> ruby-lsp
Ruby LSP> Running bundle install for the custom bundle. This may take a while...
'BUNDLE_GEMFILE' is not recognized as an internal or external command,
operable program or batch file.
C:/Users/REDACTED/scoop/persist/ruby/gems/gems/ruby-lsp-0.7.4/exe/ruby-lsp:30:in `exec': No such file or directory - BUNDLE_GEMFILE=.ruby-lsp/Gemfile bundle exec ruby-lsp  (Errno::ENOENT)
        from C:/Users/REDACTED/scoop/persist/ruby/gems/gems/ruby-lsp-0.7.4/exe/ruby-lsp:30:in `<top (required)>'
        from C:/Users/REDACTED/scoop/apps/ruby/current/gems/bin/ruby-lsp:32:in `load'
        from C:/Users/REDACTED/scoop/apps/ruby/current/gems/bin/ruby-lsp:32:in `<main>'

This appears to be related to this VS Code extension issue.

Expected output

ruby-lsp should finish its initialization sequence rather than crashing.

@blm768 blm768 added the bug Something isn't working label Jul 27, 2023
vinistock pushed a commit that referenced this issue Feb 28, 2024
…d-patch-b3f78f4bd7

Bump the minor-and-patch group with 4 updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant