-
Notifications
You must be signed in to change notification settings - Fork 196
Ruby LSP fails to activate through VSCode with error: Unable to read input file: Is a directory
#1471
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
Comments
I see you stated bash. |
Do you have |
I do have |
me too. my $ tail -n 3 ~/.bashrc
if [ -z $NO_FISH ]; then
exec fish
fi so, the command seem to fail due to Fish hello message.
Without Fish shell or run command without $ /bin/bash -c 'ruby -rjson -e "STDERR.printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, JSON.dump({ env: ENV.to_h, ruby_version: RUBY_VERSION, yjit: defined?(RubyVM::YJIT) }))"'
RUBY_ENV_ACTIVATE{"env":{"SHELL":"/bin/bash","COLORTERM":"truecolor","TERM_PROGRAM_VERSION":"1.87.1","JAVA_HOME":"/usr/lib/jvm/java-11-openjdk-amd64","RBENV_SHELL":"bash", …… |
Yeah, we're currently working on decoupling Ruby environment activation from the shell, exactly because we have no control over what users do in their configurations. If something waits for input, highjacks the stderr pipe or does other things of that nature, then invoking the Ruby activation script with the shell will likely fail. We have been exploring a new activation mechanism, which decouples the extension from the shell. You can already use this new mechanism by installing the prerelease version of the extension, which will probably fix activation for you. And we're getting changes ready to release this in stable #1502 and #1438. |
The prerelease version worked fine in my environments ! Thank you! |
This issue is being marked as stale because there was no activity in the last 2 months |
Mise support with no shell coupling has been released in stable versions for a while, so I'll close this issue. |
Description
Reproduction steps
When trying to start Ruby LSP through VSCode, it fails with the error message below:
The command runs on the command line perfectly fine, and a manually installed ruby-lsp gem starts up just fine as well. I've scanned through the activation code, and I cannot see where it's trying to read a file to attempt to deconflict it.
The text was updated successfully, but these errors were encountered: