ruby-lsp: command not found: rbenv
Description
Instantly when starting VSCode and extensions are starting up I get an error telling me that the rbenv command can’t be found. It worked on Friday, but today it’s not and I’m not sure what could be wrong. ¯\(ツ)/¯
rbenv was installed via Homebrew and is up to date.
All my extensions is up to date.
Ruby LSP Information
The Collect Ruby LSP Information for Issue Reporting is not working. Nothing happens.
Reproduction steps
- Start VSCode with Ruby LSP installed.
- Get error.
Code snippet or error message
Automatic Ruby environment activation with rbenv failed:
Command failed: rbenv exec ruby -W0 -rjson -e 'STDERR.print("RUBY_LSP_ACTIVATION_SEPARATOR" + { env: ENV.to_h, yjit: !!defined?(RubyVM::YJIT), version: RUBY_VERSION, gemPath: Gem.path }.to_json + "RUBY_LSP_ACTIVATION_SEPARATOR")'
zsh:1: command not found: rbenv
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 16 (9 by maintainers)
I opened #2824 to give the same solution we used for Shadowenv a shot. I’d still want to understand how we get into this situation, but I’m hopeful that the PR will fix the problem.
I’ve got the same issue.
rbenvis loaded in.zshrcwith:And it’s working in a regular VS Code terminal window (i.e.,
rbenv versionreturns the right Ruby version for this project).