Skip to content

Detect ruby bin path from gem environment #3737

@sparr

Description

@sparr

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

I have ruby installed globally in /usr/bin/ and ruby gems installed globally in /usr/lib/ruby/gems/ and locally in ~/.local/share/gem/. This arrangement works with various standard ruby tools (ruby, gem, bundle, etc).

Description

Ruby LSP should recognize this configuration and use it to run ruby-lsp without explicit custom configuration.

Implementation

In my shell I use gem environment path to get the relevant paths. This functionality could be used by Ruby LSP.

command -v gem > /dev/null && export PATH="$PATH":$(gem environment path)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions