Integrate with vscode
harrygr opened this issue · 2 comments
I'm having some trouble with a VSCode extension that executes a ruby command: htmlbeautifier (via the vscode-erb-beautify extension).
I have no trouble executing the htmlbeautifier
command from my shell (having chruby'd to the correct version), including the vscode terminal, but vscode errors with couldn't run htmlbeautifier 'spawn htmlbeautifier ENOENT'
, presumably because it's still using the system ruby.
Any ideas on how to get this working?
I have both the chruby.sh
and auto.sh
source
d in my .zshrc
.
This is likely due to VSCode not executing commands in a shell, but executing them as separate processes (JetBrains RubyMine used to do this). VSCode would need to change how they execute commands wrt the project. Or you could try installing the Ruby VSCode extension by Peng Lv which claims to support auto-detecting the project's ruby version and integrates with RVM, rbenv, chruby, and asdf.
I don't have an issue with chruby in vscode. I don't even have the Ruby VSCode extension set up. I just have my vscode terminal load as it would in iterm.