簡體   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