You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed the ruby-lsp vs code extension v0.5.9, and ran the below commands in a terminal:
rails new "example"
code example
As VS Code opens, I get a toast with this message:
Failed to activate asdf environment: Cannot read properties of null (reading '1')
This is the output from ruby-lsp:
2024-02-07 12:28:14.059 [info] (example) Checking if asdf is available on the path with command: zsh -i -c 'asdf --version'
2024-02-07 12:28:14.436 [info] (example) Discovered version manager asdf
2024-02-07 12:28:14.436 [info] (example) Trying to activate Ruby environment with command: zsh -i -c 'asdf exec ruby -rjson -e "STDERR.printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, JSON.dump({ env: ENV.to_h, ruby_version: RUBY_VERSION, yjit: defined?(RubyVM::YJIT) }))"' inside directory: /Users/gergely.karolyi/Code/example
If I use 'Install another version' and install v0.4.21, there is no error and this is the output from ruby-lsp:
2024-02-07 12:39:23.095 [info] Checking if asdf is available on the path with command: zsh -ic 'asdf --version'
2024-02-07 12:39:23.648 [info] Discovered version manager asdf
2024-02-07 12:39:23.648 [info] Trying to activate Ruby environment with command: zsh -ic 'asdf exec ruby -rjson -e "File.write(\"/var/folders/8w/ht214zm55gs6dsckv8flbnm80000gp/T/ruby_lsp_example\", JSON.dump({ env: ENV.to_h, ruby_version: RUBY_VERSION, yjit: defined?(RubyVM::YJIT) }))"' inside directory: /Users/gergely.karolyi/Code/example
2024-02-07 12:39:24.511 [info] Ruby LSP> Skipping custom bundle setup since /Users/gergely.karolyi/Code/example/.ruby-lsp/Gemfile.lock already exists and is up to date
2024-02-07 12:39:24.514 [info] Ruby LSP> Running bundle install for the custom bundle. This may take a while...
Ruby LSP> Command: (bundle check || bundle install) 1>&2
2024-02-07 12:39:24.666 [info] The Gemfile's dependencies are satisfied
2024-02-07 12:39:25.001 [info] Starting Ruby LSP v0.13.4...
2024-02-07 12:39:25.118 [info] Ruby LSP is ready
Installing v0.4.22 leads to the same error as above.
The text was updated successfully, but these errors were encountered:
Thank you for the bug report! If v0.4.22 brings the problem back, then you must be facing a situation similar to #1712. Some shell plugins take control over the stderr pipe and break the communication of the extension.
The change that was reverted in v0.4.22 switched from using stderr to using a temporary file, but that resulted in errors for Windows users.
Operating System
macOS Sonoma 14.2.1 (M1)
Ruby version
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
Project has a bundle
Ruby version manager being used
asdf
Description
I installed the ruby-lsp vs code extension v0.5.9, and ran the below commands in a terminal:
As VS Code opens, I get a toast with this message:
This is the output from ruby-lsp:
If I use 'Install another version' and install v0.4.21, there is no error and this is the output from ruby-lsp:
Installing v0.4.22 leads to the same error as above.
The text was updated successfully, but these errors were encountered: