如何链接ruby-v到asdf?



我正在使用asdf安装ruby,我遇到了如下问题:

$ asdf list
ruby
3.0.2
$ ruby -v
Command 'ruby' not found, but can be installed with:
sudo apt install ruby

如何连接ruby-v到asdf?

  1. 我尝试按照asdf-vm文档
  2. 卸载asdf
# Delete the following in your .bashrc file
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
# Remove the $HOME/.asdf directory and all asdf config files by typing 
# the following in your terminal
rm -rf ${ASDF_DATA_DIR:-$HOME/.asdf}
rm -rf $HOME/.tool-versions $HOME/.asdfrc
  1. 然后,我重新安装了asdf,阅读了我成功地使版本正确安装asdf (ruby, nodejs和yarn)后,在WSL2

引用

  1. Microsoft WSL2 Documentation
  2. asdf虚拟管理器文档
  3. WSL 2: Getting started
  4. BUILD FAILED (Ubuntu 20.04 using ruby-build 20210804)
  5. 安装asdf并使用它来安装Go, Python &起程拓殖
  6. 在Rails上安装Ruby

最新更新