これは何
Failed to activate asdf environment: Command failed: /opt/homebrew/bin/fish -ic 'asdf exec ruby -rjson -e "printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, JSON.dump(ENV.to_h))"' unknown command: ruby. Perhaps you have to reshim?
調べた内容
- Rubyのバージョン管理は
rbenv
でやっているしなぜ asdf
が出てくるんだ?と思いながらネットを調べてみても特に同じ現象は見当たらず。
- Ruby LSPのUsageをみたところ以下の文言があった。
Ruby version managers
To boot the server properly, the Ruby LSP uses a version manager to activate the right environment variables that point Bundler to the Ruby and gem paths. This is especially necessary when switching between projects that use different Ruby versions - since those paths change and need to be reactivated.
By default, the Ruby LSP will attempt to automatically determine which version manager it should use, checking which ones are available (auto option). If that fails, then the version manager must be manually configured. You can do so by clicking Change version manager in the language status center or by changing your VS Code user settings.
- バージョンマネージャの判別ができなかったので設定から手動で切り替えて再起動したところ、エラーは解消した。