Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

'Kernel#require': cannot load such file -- bundler (LoadError)

未关闭
#4,215 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
ruby
领域
devtools

调研方向

Reproduce the failure using LazyVim, Mason, mise, and Ruby 3.4, then inspect ruby_lsp/setup_bundler.rb and the ruby-lsp executable at the stack-trace locations. Compare the Ruby and gem environments used by ruby-lsp with those selected by mise. Done means the reported setup starts Ruby LSP without the bundler LoadError, with the cause and verification recorded.

由索引模型根据 Issue 内容生成。

描述

bug
Description
Ruby LSP Information

I am running LazyVim (A supercharged Neovim config) using the default Ruby language extra. I also use mise as my version manager. When you install Ruby with mise it automatically sets up both the gem and bundler executables. I'm running on the latest Arch Linux as of Friday September 25th 2026 at 3pm.

Reproduction steps
  1. Start the Ruby LSP using a certain editor
  2. Open a Ruby file
  3. Get an error from the Neovim LSP client.
  4. Check the log and I get the below error (It also does this if I just invoke ruby-lsp from where Mason installs it.

Code snippet or error message

<internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require': cannot load such file -- bundler (LoadError)
Did you mean?  bundled_gems
        from <internal:/usr/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
        from /home/gvqz/.local/share/nvim/mason/packages/ruby-lsp/gems/ruby-lsp-0.26.11/lib/ruby_lsp/setup_bundler.rb:4:in '<top (required)>'
        from /home/gvqz/.local/share/nvim/mason/packages/ruby-lsp/gems/ruby-lsp-0.26.11/exe/ruby-lsp:69:in 'Kernel#require_relative'
        from /home/gvqz/.local/share/nvim/mason/packages/ruby-lsp/gems/ruby-lsp-0.26.11/exe/ruby-lsp:69:in '<top (required)>'
        from /home/gvqz/.local/share/nvim/mason/packages/ruby-lsp/bin/ruby-lsp:25:in 'Kernel#load'
        from /home/gvqz/.local/share/nvim/mason/packages/ruby-lsp/bin/ruby-lsp:25:in '<main>'

It seems like it is defaulting to the system ruby version that gets used by my systems package manager, and not the mise version manager.

I am also very new to Ruby, but not coding. So I have a feeling there is some weird environment mismatch, I'd love to be pointed in the right direction.

主要语言
Ruby
星标
2k
派生
284
平均合并
11 小时 11 分钟
30 天内合并 PR
10

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Shopify/ruby-lsp 的其他 Issue

查看 Shopify/ruby-lsp 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。