Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with vscode #481

Open
harrygr opened this issue Jun 27, 2022 · 2 comments
Open

Integrate with vscode #481

harrygr opened this issue Jun 27, 2022 · 2 comments

Comments

@harrygr
Copy link

harrygr commented Jun 27, 2022

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 sourced in my .zshrc.

Originally posted by @harrygr in #480

@harrygr harrygr changed the title I'm having some trouble with a VSCode extension that executes a ruby command: [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) (via the [vscode-erb-beautify](https://github.com/aliariff/vscode-erb-beautify) extension). Integrate with vscode Jun 27, 2022
@postmodern
Copy link
Owner

postmodern commented Jun 28, 2022

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.

@mculp
Copy link

mculp commented Jan 5, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants