You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The global path is found at ~/.pixi/bin, and gems will be found at ~/.pixi/envs/ruby/share/rubygems. Currently the VSCode ruby-lsp cannot find ruby automatically. Adding it manually via rubyExecutablePath and ruby-lsp still cannot start. Probably I need to set rubyVersionManager but this is not working per-se.
2024-10-24 08:18:44.833 [info] (.dotfiles) Running command: `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")'` in /Users/ian/.dotfiles using shell: /usr/local/bin/elvish
2024-10-24 08:18:53.735 [info] (.dotfiles) /Users/ian/.pixi/envs/ruby/share/rubygems/bin/ruby-lsp: line 6: /Users/ian/.pixi/envs/ruby/share/rubygems/bin/ruby: No such file or directory
/Users/ian/.pixi/envs/ruby/share/rubygems/bin/ruby-lsp: line 6: exec: /Users/ian/.pixi/envs/ruby/share/rubygems/bin/ruby: cannot execute: No such file or directory
2024-10-24 08:18:53.735 [info] (.dotfiles) [Error - 08:18:53] Server process exited with code 126.
2024-10-24 08:18:53.736 [info] (.dotfiles) [Error - 08:18:53] Server initialization failed.
2024-10-24 08:18:53.736 [info] (.dotfiles) Message: Pending response rejected since connection got disposed
Code: -32097
It claims it can't find ruby at /Users/ian/.pixi/envs/ruby/share/rubygems/bin/ruby but the ruby-lsp shows /Users/ian/.pixi/envs/ruby/bin/ruby:
...
8#!/Users/ian/.pixi/envs/ruby/bin/ruby9#10# This file was generated by RubyGems.11#12# The application 'ruby-lsp' is installed as part of a gem, and13# this file is here to facilitate running it.14#1516require'rubygems'1718Gem.use_gemdeps
...
Thank you for the feature suggestion! Since this version manager is quite new, I'd like to first understand what level of traction and adoption it will receive in the Ruby community, before we commit to maintaining yet another version manager integration.
For the time being, you should be able to use our custom integration mode to get it working. Please let us know if that's not the case.
Just to update for anyone using pixi: pixi installed ruby[1] works well to manage ruby-lsp in VSCode except for a bug in the ruby install recipe where there is no symlinked ruby in the rubygems/bin folder, to fix this follow the symlink instructions from conda-forge/ruby-feedstock#116 then set:
The version manager being set to custom doesn't do anything if you don't define "rubyLsp.customRubyCommand" as well, so I suppose it's just having the "rubyLsp.rubyExecutablePath" global fallback that's doing the trick.
I have checked that this feature is not already implemented
Use case
Pixi is a new cross-platform package manager that uses conda-forge but offers global as well as directory specific tool installation.
https://pixi.sh
I want to be able to use
pixi
to manage myruby
and haveruby-lsp
in VSCode support this increasingly popular install method.Description
To install ruby and then a gem:
curl -fsSL https://pixi.sh/install.sh | bash pixi global install ruby ruby -v gem install ruby-lsp
The global path is found at
~/.pixi/bin
, and gems will be found at~/.pixi/envs/ruby/share/rubygems
. Currently the VSCode ruby-lsp cannot find ruby automatically. Adding it manually viarubyExecutablePath
and ruby-lsp still cannot start. Probably I need to setrubyVersionManager
but this is not working per-se.It claims it can't find ruby at
/Users/ian/.pixi/envs/ruby/share/rubygems/bin/ruby
but the ruby-lsp shows/Users/ian/.pixi/envs/ruby/bin/ruby
:User
Implementation
No response
The text was updated successfully, but these errors were encountered: