Skip to content

Instantly share code, notes, and snippets.

@sfate
Last active May 28, 2024 20:53
Show Gist options
  • Save sfate/f395d6f37efaaa0a962c6cf0871f3168 to your computer and use it in GitHub Desktop.
Save sfate/f395d6f37efaaa0a962c6cf0871f3168 to your computer and use it in GitHub Desktop.
Update asdf plugins
brew upgrade asdf
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
RUBY_VERSION=3.3.0
NODE_VERSION=20.11.0
GO_VERSION=1.22.3
# prequisite for
export RUBY_CONFIGURE_OPTS=--enable-yjit
asdf plugin-add rust
asdf install rust latest
asdf global rust latest
asdf install ruby $RUBY_VERSION
asdf install nodejs $NODE_VERSION
asdf install golang $GO_VERSION
cd first-prj-folder
asdf local ruby $RUBY_VERSION
# preinstall build lib for pg
brew install libpq
echo 'export PATH="$(brew --prefix)/opt/libpq/bin:$PATH"' >> ~/.zshrc
# preinstall mysql with custom build paths
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
# actual gems install
bundle install
cd prj-folder
asdf local nodejs $NODE_VERSION
npm install -g yarn
yarn install
cd another-prj-folder
asdf local golang $GO_VERSION
go mod tidy -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment