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
I cannot get ruby-lsp to work. IT fails to start, and judging from the trouble shoot output, there is something wrong with the environment it is running in, even though it seems to have the correct ENV with the paths set correctly. From the paths alone it looks like it uses the correct ruby, however the stack trace indicates is is trying to use ruby 2.6 somehow 😵💫??
launching sublime with subl from within a given project
subl is part of my PATH and not a symlink.
ruby version is defined in a .ruby-version file
ruby-lsp part of my gemfile
-ruby-lsp installs without problems with bundle install (from a shell)
ruby-lsp command runs in my local environment without problems (from a shell)
Troubleshooting: ruby-lsp
Version
LSP: 2.2.0
Sublime Text: 4180
Server Test Run
exit code: 1
output
Ignoring prism-1.2.0 because its extensions are not built. Try: gem pristine prism --version 1.2.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
Ignoring rbs-3.6.1 because its extensions are not built. Try: gem pristine rbs --version 3.6.1
Ignoring rbs-3.4.0 because its extensions are not built. Try: gem pristine rbs --version 3.4.0
/Users/peter.lehwess/.gem/ruby/3.3.5/gems/sorbet-runtime-0.5.11645/lib/types/private/methods/_methods.rb:127:in `<module:Methods>': undefined method `const_source_location' for T:Module (NoMethodError)
from /Users/peter.lehwess/.gem/ruby/3.3.5/gems/sorbet-runtime-0.5.11645/lib/types/private/methods/_methods.rb:4:in `<top (required)>'
from /Users/peter.lehwess/.gem/ruby/3.3.5/gems/sorbet-runtime-0.5.11645/lib/sorbet-runtime.rb:25:in `require_relative'
from /Users/peter.lehwess/.gem/ruby/3.3.5/gems/sorbet-runtime-0.5.11645/lib/sorbet-runtime.rb:25:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/peter.lehwess/.gem/ruby/3.3.5/gems/ruby-lsp-0.21.3/lib/ruby_lsp/setup_bundler.rb:4:in `<top (required)>'
from /Users/peter.lehwess/.gem/ruby/3.3.5/gems/ruby-lsp-0.21.3/exe/ruby-lsp:72:in `require_relative'
from /Users/peter.lehwess/.gem/ruby/3.3.5/gems/ruby-lsp-0.21.3/exe/ruby-lsp:72:in `<top (required)>'
from /Users/peter.lehwess/.gem/ruby/3.3.5/bin/ruby-lsp:25:in `load'
from /Users/peter.lehwess/.gem/ruby/3.3.5/bin/ruby-lsp:25:in `<main>'
Thank you for the bug report! I believe the issue is that the chruby environment is not activated inside the process that runs Sublime Text, which is documented here under the important tip.
Essentially, chruby mutates a few environment variables to allow ruby and gem executables to properly find things. That happens in your terminal, but it does not happen inside the process running Sublime Text. The fact that it's trying to use Ruby 2.6 gives it away, because that's the system Ruby - the one available when no environment variables have been mutated.
Ensure that chruby is activating the environment before invoking ruby-lsp in your command configuration. Instead of using simply ruby-lsp, you need to either switch the version and then call the gem executable or use something like chruby-exec. Something along the lines of
chruby $(cat .ruby-version) && ruby-lsp
Please report back if it works or if you encounter any issues. We will also gladly accept improvements to our editors documentation for better Sublime instructions.
Description
Reproduction steps
I cannot get ruby-lsp to work. IT fails to start, and judging from the trouble shoot output, there is something wrong with the environment it is running in, even though it seems to have the correct ENV with the paths set correctly. From the paths alone it looks like it uses the correct ruby, however the stack trace indicates is is trying to use ruby 2.6 somehow 😵💫??
Main points:
Using sublime text version 4180
Config:
subl
is part of myPATH
and not a symlink..ruby-version
fileruby-lsp
part of my gemfile-
ruby-lsp
installs without problems with bundle install (from a shell)ruby-lsp
command runs in my local environment without problems (from a shell)Troubleshooting: ruby-lsp
Version
Server Test Run
Server Configuration
[ "ruby-lsp" ]
Active view
Project / Workspace
[ "/Users/peter.lehwess/development/****/******" ]
LSP configuration
System PATH
The text was updated successfully, but these errors were encountered: