Open
Description
I've searched open issues for similar requests
- Yes
I've manually reviewed logs to find potential errors
- Yes
I've recently downloaded the latest plugin version of mason.nvim
- Yes
Problem description
I use multiple versions of ruby in my day-to-day. If I install solargraph through mason, it will create a folder with vendored versions of the gems and then it starts giving errors such as this one:
[ERROR][2023-05-09 12:10:19] .../vim/lsp/rpc.lua:734 "rpc" "solargraph" "stderr" "#<Thread:0x00007f0da313f508 /home/renatolond/.local/share/nvim/mason/packages/solargraph/gems/solargraph-0.49.0/lib/solargraph/language_server/host/message_worker.rb:43 run> terminated with exception (report_on_exception is true):\n<internal:/home/renatolond/.rvm/rubies/ruby-3.2.2-jemalloc/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require': linked to incompatible /home/renatolond/.rvm/rubies/ruby-3.1.4-jemalloc/lib/libruby.so.3.1 - /home/renatolond/.local/share/nvim/mason/packages/solargraph/gems/rbs-2.8.4/lib/rbs_extension.so (LoadError)\n\tfrom <internal:/home/renatolond/.rvm/rubies/ruby-3.2.2-jemalloc/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'\n"
rbs
is linked to ruby a 3.1 so and that's not compatible. Removing the generated solargraph folder fixes the issue (I then can install solargraph manually in each of the versions)
Expected behavior
I'm not really sure what's the expected behavior here, should mason refuse to install solargraph if it detects a rvm or rbenv? Or try to install through those?
Steps to reproduce
- Using rvm, select version 3.1 of ruby, open nvim and install solargraph
- exit nvim, switch to version 3.2 and open nvim again
Affected packages
solargraph
Neovim version (>= 0.7)
NVIM v0.9.0
Build type: Release
LuaJIT 2.1.0-beta3
Operating system/version
Linux 6.3.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 01 May 2023 17:42:39 +0000 x86_64 GNU/Linux [
Healthcheck
==============================================================================
mason: require("mason.health").check()
mason.nvim ~
- OK mason.nvim version v1.0.1
- OK neovim version >= 0.7.0
mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2023-05-08-intact-susan` is installed.
mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send`
- OK wget: `GNU Wget 1.21.3 built on linux-gnu.`
- OK curl: `curl 8.0.1 (x86_64-pc-linux-gnu) libcurl/8.0.1 OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.10.0 nghttp2/1.52.0`
- OK gzip: `gzip 1.12`
- OK tar: `tar (GNU tar) 1.34`
- OK bash: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`
mason.nvim [Languages] ~
- WARNING luarocks: not available
- ADVICE:
- spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- WARNING Composer: not available
- ADVICE:
- spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
- ADVICE:
- spawn: php failed with exit code - and signal -. php is not executable
- OK Ruby: `ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]`
- OK Go: `go version go1.20.4 linux/amd64`
- OK cargo: `cargo 1.69.0`
- OK node: `v16.20.0`
- WARNING julia: not available
- ADVICE:
- spawn: julia failed with exit code - and signal -. julia is not executable
- OK python3: `Python 3.11.3`
- OK java: `openjdk version "20.0.1" 2023-04-18`
- OK javac: `javac 20.0.1`
- OK RubyGem: `3.4.10`
- OK npm: `8.19.2`
- OK pip3: `pip 23.1.2 from /usr/lib/python3.11/site-packages/pip (python 3.11)`
mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Tue 09 May 2023 14:11:53.
Install and authenticate via gh-cli to increase rate limit.
Screenshots or recordings
No response