0

I am installing ruby using asdf and I encounter the issue shown below:

$ asdf list
ruby
  3.0.2

$ ruby -v

Command 'ruby' not found, but can be installed with:

sudo apt install ruby

How to link the ruby-v to asdf?

Flux
  • 9,805
  • 5
  • 46
  • 92
michelle
  • 49
  • 1
  • 6

1 Answers1

0
  1. I tried to uninstall the asdf by following the asdf-vm documentation
# 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. Then, I reinstall the asdf, read the post I made after successfully making the versions correct Install asdf (ruby, nodejs and yarn) in WSL2

References

  1. Microsoft WSL2 Documentation
  2. asdf virtual manager Documentation
  3. WSL 2: Getting started
  4. BUILD FAILED (Ubuntu 20.04 using ruby-build 20210804)
  5. Installing asdf and using it to install Go, Python & Terraform
  6. Installing Ruby on Rails Using asdf
michelle
  • 49
  • 1
  • 6
  • This link is fine, but according to SO rules, all the supporting information should be provided within your post. It is better in case the link dies by time, which might sound ridiculous but happens quite often. The post would be unhelpful then. – Ruli Aug 31 '21 at 07:43
  • Please add further details to expand on your answer, such as working code or documentation citations. – Community Aug 31 '21 at 07:43
  • @Ruli Yes, I did put the links in the post as References, do tell me if there is any part still need improvement, thanks a lot – michelle Aug 31 '21 at 11:24
  • @Community Is the edited version better now? Do tell me anything that needs improvements – michelle Aug 31 '21 at 11:39