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

Ruby Lsp failed to initialize #3017

Open
Anirudh2011 opened this issue Dec 13, 2024 · 1 comment
Open

Ruby Lsp failed to initialize #3017

Anirudh2011 opened this issue Dec 13, 2024 · 1 comment

Comments

@Anirudh2011
Copy link

I'm using ruby 3.2.1 in my project and ruby-lsp fails to initialize

In my Gemfile

gem 'sorbet-runtime', '~> 0.5.11691'
gem 'ruby-lsp'
gem 'ruby-lsp-rails', '~> 0.3.26'

but when I run ruby-lsp on terminal, the error I'm getting is

<internal:/Users/anirudh/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- sorbet-runtime (LoadError)
        from <internal:/Users/anirudh/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /Users/anirudh/.rvm/gems/ruby-3.2.1@rails-backend-server/gems/ruby-lsp-0.22.1/lib/ruby_lsp/setup_bundler.rb:4:in `<top (required)>'
        from /Users/anirudh/.rvm/gems/ruby-3.2.1@rails-backend-server/gems/ruby-lsp-0.22.1/exe/ruby-lsp:72:in `require_relative'
        from /Users/anirudh/.rvm/gems/ruby-3.2.1@rails-backend-server/gems/ruby-lsp-0.22.1/exe/ruby-lsp:72:in `<top (required)>'
        from /Users/anirudh/.rvm/gems/ruby-3.2.1@rails-backend-server/bin/ruby-lsp:25:in `load'
        from /Users/anirudh/.rvm/gems/ruby-3.2.1@rails-backend-server/bin/ruby-lsp:25:in `<main>'
        from /Users/anirudh/.rvm/gems/ruby-3.2.1@rails-backend-server/bin/ruby_executable_hooks:22:in `eval'
        from /Users/anirudh/.rvm/gems/ruby-3.2.1@rails-backend-server/bin/ruby_executable_hooks:22:in `<main>'

Can anyone help with this please, I'm not able to navigate and use git in my project

@vinistock
Copy link
Member

Thank you for the report! Regarding git, that is probably not related to the Ruby LSP. We don't do anything that would prevent you from using git.

Regarding the error, it could be related to the new launcher mode we're experimenting it. If you try the steps on this issue, does it fix the problem for you?

I'll also transfer this to ruby-lsp since this is not related to the Rails add-on.

@vinistock vinistock transferred this issue from Shopify/ruby-lsp-rails Jan 7, 2025
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

2 participants