A command line tool for multiple development virtual environments - asdf
A command line tool for multiple development virtual environments - asdf
asdf is a good multi-development virtual environment building tool (I accidentally discovered it when playing Ruby). Commonly used virtual environment tools for Ruby include RVM
and Rbenv
. But current development will include multi-language development environments such as python and nodejs. Although this tool is not as powerful as Docker, it is enough for individual developers to use on a regular desktop or laptop to manage these languages.
Install
need first curl
, [git](/search?q=git)
andaria2
$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
Adding ~/.bashrc
:
. $HOME/.asdf/asdf.sh
Complete needs to be added:
. $HOME/.asdf/completions/asdf.bash
Refer to the official website
plug-in
Here are the plugins he provides:
asdf plugin-add clojure https://github.com/vic/asdf-clojure.git
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
asdf plugin-add python https://github.com/tuvistavie/asdf-python.git
asdf plugin-add [ruby](/search?q=ruby) https://github.com/asdf-vm/asdf-ruby.git
# Imports Node.js release team's OpenPGP keys to main keyring
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
Update plugin:
asdf plugin-update --all
Install Ruby:
asdf list-all ruby
asdf install ruby 3.1.3
It downloads without prompts, but provides:
To follow progress, use 'tail -f /tmp/ruby-build.20221209155213.2253.log' or pass --verbose
Downloading ruby-3.1.3.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.3.tar.gz
^Cerror: failed to download ruby-3.1.3.tar.gz
BUILD FAILED (EndeavourOS rolling using ruby-build 20221206)
Refer to
Replacing RVM/Rbenv/Nvm/etc for ASDF