You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I opened a ruby file, rubyLSP tries to start -> looks for missing gems and realises that mysql2 (0.5.3) is missing so it tries to install it but fails at installation step. This happened only today and I did not update the gem. I think LSP is looking at a different folder for the gem.
Expected Behaviour
rubyLSP should be able to find the gem so it does not need to install it.
bundle info mysql2 shows the path is /Users/aljt/.rvm/gems/ruby-3.1.1/gems/mysql2-0.5.3
VScode output logs from LSP
The GEM_HOME and GEM_PATH variables are different from the ones I ran in the terminal using echo
Activated Ruby environment: GEM_HOME=/Users/aljt/.gem/ruby/3.1.0 GEM_PATH=/Users/aljt/.gem/ruby/3.1.0:/Users/aljt/.rvm/rubies/ruby-3.1.1/lib/ruby/gems/3.1.0 PATH=/Users/aljt/.gem/ruby/3.1.0/bin:/Users/aljt/.rvm/rubies/ruby-3.1.1/lib/ruby/gems/3.1.0/bin:/Users/aljt/.rvm/rubies/ruby-3.1.1/bin:/Users/aljt/.rvm/gems/ruby-3.1.1/bin:/Users/aljt/.rvm/gems/ruby-3.1.1@global/bin:/Users/aljt/.rvm/rubies/ruby-3.1.1/bin:/Users/aljt/.nvm/versions/node/v12.20.0/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/aljt/.rvm/bin
...some logs...
The following gems are missing
* mysql2 (0.5.3)
Install missing gems with `bundle install`
...some logs...
An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.
In Gemfile:
mysql2
/Users/aljt/.rvm/rubies/ruby-3.1.1/lib/ruby/3.1.0/bundler/definition.rb:481:in `materialize': Could not find mysql2-0.5.3 in any of the sources (Bundler::GemNotFound)... more logs...
Troubleshooting
Tried to uninstall the extension, deleted the .ruby-lsp folder and reinstalled but did not work.
The text was updated successfully, but these errors were encountered:
Description
I opened a ruby file, rubyLSP tries to start -> looks for missing gems and realises that mysql2 (0.5.3) is missing so it tries to install it but fails at installation step. This happened only today and I did not update the gem. I think LSP is looking at a different folder for the gem.
Expected Behaviour
System / Project specs
bundle --version
shows 2.3.7ruby --version
shows 3.1.1p18echo $GEM_HOME
shows /Users/aljt/.rvm/gems/ruby-3.1.1echo $GEM_PATH
shows /Users/aljt/.rvm/gems/ruby-3.1.1:/Users/aljt/.rvm/gems/ruby-3.1.1@globalecho $RUBY_VERSION
shows ruby-3.1.1ruby -e 'puts [Gem.user_dir, Gem.default_dir]'
shows/Users/aljt/.gem/ruby/3.1.0
/Users/aljt/.rvm/rubies/ruby-3.1.1/lib/ruby/gems/3.1.0
bundle info mysql2
shows the path is/Users/aljt/.rvm/gems/ruby-3.1.1/gems/mysql2-0.5.3
VScode output logs from LSP
The GEM_HOME and GEM_PATH variables are different from the ones I ran in the terminal using
echo
Troubleshooting
.ruby-lsp
folder and reinstalled but did not work.The text was updated successfully, but these errors were encountered: