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

Failed to activate rvm environment

Open onwardmk opened this issue 1 year ago • 1 comments

Description

I've been using the Ruby LSP vscode extension for about a year without any issues.

Today I started seeing the error message below when I launch vscode. I'm launching vscode from the terminal with the code . command.

Failed to activate rvm environment: Command failed: /home/onwardmk/.rvm/bin/rvm-auto-ruby -W0 -rjson -e 'STDERR.print({yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION,home:Gem.user_dir,default:Gem.default_dir,ruby:RbConfig.ruby}.to_json)' /bin/sh: 1: /home/onwardmk/.rvm/bin/rvm-auto-ruby: not found

Based on the error message, the problem appears to be that it's looking for rvm in my home folder, but rvm is installed in /usr/share/rvm on my machine. I don't see a vscode setting to specify the path.

vscode version: 1.87.2 Ruby LSP version: v0.5.16 rvm version: 1.29.12

onwardmk avatar Apr 02 '24 00:04 onwardmk

I have the same issue +1

Reference here: https://github.com/Shopify/ruby-lsp/blob/e95abdeabdd898bf01edd9b6d03d51e269ff71d0/vscode/src/ruby/rvm.ts#L23

joennlae avatar Apr 02 '24 09:04 joennlae

Fixed by https://github.com/Shopify/ruby-lsp/pull/1869.

vinistock avatar May 30 '24 21:05 vinistock