Skip to content

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

Description

@GV14982

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions