繁体   English   中英

如何将 ruby​​-v 链接到 asdf?

[英]How to link ruby-v to 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 文档卸载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 ,阅读我在成功使版本正确后发表的帖子在 WSL2 中安装 asdf(ruby、nodejs 和 yarn)

参考

  1. Microsoft WSL2 文档
  2. asdf 虚拟管理器文档
  3. WSL 2:入门
  4. 构建失败(Ubuntu 20.04 使用 ruby​​-build 20210804)
  5. 安装 asdf 并使用它来安装 Go、Python 和 Terraform
  6. 使用 asdf 安装 Ruby on Rails

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM