Skip to content

Instantly share code, notes, and snippets.

@sfate
Last active May 22, 2026 20:31
Show Gist options
  • Select an option

  • Save sfate/f395d6f37efaaa0a962c6cf0871f3168 to your computer and use it in GitHub Desktop.

Select an option

Save sfate/f395d6f37efaaa0a962c6cf0871f3168 to your computer and use it in GitHub Desktop.
Update asdf plugins
#!/bin/bash
# ~do not actually execute, just store commands~
echo "=== ASDF install commands ==="
cat "$0"
echo "=== End ==="
exit 0
# Install
## Install asdf itself
brew install asdf
echo 'export PATH="$HOME/.asdf/shims:$PATH"' >> ~/.zshrc
source ~/.zshrc
## prequisites
### ruby's JIT
export RUBY_CONFIGURE_OPTS=--enable-yjit
asdf plugin-add rust
asdf install rust latest
asdf global rust latest
### ruby's postgres
brew install libpq
echo 'export PATH="$(brew --prefix)/opt/libpq/bin:$PATH"' >> ~/.zshrc
### ruby's mysql
brew install mysql
gem install mysql2 -- \
--with-mysql-lib=$(brew --prefix)/opt/mysql/lib \
--with-mysql-dir=$(brew --prefix)/opt/mysql \
--with-mysql-config=$(brew --prefix)/opt/mysql/bin/mysql_config \
--with-mysql-include=$(brew --prefix)/opt/mysql/include \
--with-ldflags=-L$(brew --prefix)/opt/zlib/lib
## Add plugins
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin add golang https://github.com/asdf-community/asdf-golang.git
asdf plugin-add rust
# Update
## Update plugins
asdf plugin update --all
## Set versions
RUBY_VERSION=3.4.2
NODE_VERSION=20.11.0
GO_VERSION=1.25.10
## Actual languages install
asdf install ruby $RUBY_VERSION
asdf install nodejs $NODE_VERSION
asdf install golang $GO_VERSION
## Set versions on user level
asdf set -u ruby $RUBY_VERSION
asdf set -u nodejs $NODE_VERSION
asdf set -u golang $GO_VERSION
# Reshim deps
asdf reshim
# ruby post-install
cd ruby-folder
## update .tools-version
asdf set ruby $RUBY_VERSION
gem install --user-install solargraph
bundle install
# node post-install
cd node-folder
## update .tools-version
asdf set nodejs $NODE_VERSION
npm install -g yarn
yarn install
# go post-install
cd go-folder
## update .tools-version
asdf set golang $GO_VERSION
## update gopls for project (dependants: nvim, claude)
go install -v golang.org/x/tools/gopls@latest
asdf reshim
go mod tidy -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment