ruby-lsp icon indicating copy to clipboard operation
ruby-lsp copied to clipboard

vs code: asdf environment variables ignored

Open gi opened this issue 9 months ago • 0 comments

Description

VS Code Ruby LSP

The extension detects asdf but fails when searching for the data directory.

The code does not appear to use the asdf environment variables:

  • ASDF_DIR
  • ASDF_DATA_DIR

Instead, it attempts to detect those values by looking at predetermined locations. This fails when a those values are set to alternative locations.

Reproduction steps

  1. set ASDF_DATA_DIR to ~/asdf-data
  2. install/setup asdf to that location (see docs)
  3. Open VS Code
  4. Open a Ruby file
  5. See error:
Automatic Ruby environment activation with asdf failed:
Could not find ASDF data dir. Searched in
file:///Users/zach.gianos/.asdf, 
file:///opt/asdf-vm, 
file:///opt/homebrew/opt/asdf/libexec, 
file:///usr/local/opt/asdf/libexec

Note

A recent update broke this customization of the asdf setup.

I presume that it was this commit: 30bc0001.

I'm simply comparing the timeframe of the commit and the functionality change. (I use Ruby LSP every day.)

gi avatar May 08 '24 18:05 gi