I'm having a problem with installing and trying to use ruby-lsp.
I think I followed the correct steps, but keep getting an error:
- Be sure I have selected the correct ruby version:
❯ rbenv versions
system
2.7.4
3.1.3
* 3.1.4 (set by /Users/myuser/.rbenv/version)
3.2.1
3.2.2
- Install the gem:
❯ gem install ruby-lsp
Successfully installed ruby-lsp-0.8.0
Ignoring debug-1.7.2 because its extensions are not built. Try: gem pristine debug --version 1.7.2
Parsing documentation for ruby-lsp-0.8.0
Done installing documentation for ruby-lsp after 0 seconds
1 gem installed
- Be sure it's listed:
❯ gem list ruby-lsp
*** LOCAL GEMS ***
ruby-lsp (0.8.0, 0.7.6, 0.4.4)
Rehash, just in case (
rbenv rehash
)Run:
❯ ruby-lsp
rbenv: ruby-lsp: command not found
The `ruby-lsp' command exists in these Ruby versions:
3.2.2
I don't get why it's present in only one version of Ruby.
Any ideas?
Thanks
Simply a missing setting: from a previous installation I had no Gem bin path in the
PATH
variable, so my problem was fixed by adding this to the.bashrc
file: