mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 07:06:40 +00:00
feat(ruby): switch from rbenv to rtx for managing Ruby versions
This commit is contained in:
@@ -18,6 +18,7 @@ neovim latest
|
|||||||
nodejs lts
|
nodejs lts
|
||||||
python latest
|
python latest
|
||||||
rclone latest
|
rclone latest
|
||||||
|
ruby latest
|
||||||
shellcheck latest
|
shellcheck latest
|
||||||
shfmt latest
|
shfmt latest
|
||||||
starship latest
|
starship latest
|
||||||
|
|||||||
46
zsh/ruby.zsh
46
zsh/ruby.zsh
@@ -2,24 +2,6 @@
|
|||||||
# Ruby environment setup.
|
# Ruby environment setup.
|
||||||
#
|
#
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# rbenv
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
# Install rbenv
|
|
||||||
zinit light-mode wait lucid as'program' pick'bin/rbenv' from'gh' \
|
|
||||||
atclone'src/configure && make -C src; libexec/rbenv init - > .rbenv.zsh' \
|
|
||||||
atpull'%atclone' src'.rbenv.zsh' nocompile'!' \
|
|
||||||
for @rbenv/rbenv
|
|
||||||
|
|
||||||
# install ruby-build
|
|
||||||
zinit light-mode wait lucid as'program' pick'bin/ruby-build' from'gh' \
|
|
||||||
for @rbenv/ruby-build
|
|
||||||
|
|
||||||
# install rbenv-each plugin
|
|
||||||
zinit light-mode wait lucid as'program' pick'bin/rbenv-each' from'gh' \
|
|
||||||
for @rbenv/rbenv-each
|
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# aliases
|
# aliases
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@@ -88,31 +70,3 @@ install_ruby_global_packages() {
|
|||||||
gem install --no-document rbenv-rehash
|
gem install --no-document rbenv-rehash
|
||||||
gem install --no-document "${packages[@]}"
|
gem install --no-document "${packages[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# bundler
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
upgrade-bundler() {
|
|
||||||
rbenv each -v gem install --no-document 'bundler:~> 1.0' 'bundler:~> 2.0'
|
|
||||||
}
|
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
# solargraph
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
solargraph-install() {
|
|
||||||
rbenv each -v gem install solargraph
|
|
||||||
}
|
|
||||||
|
|
||||||
solargraph-download-cores() {
|
|
||||||
rbenv each -v solargraph download-core
|
|
||||||
}
|
|
||||||
|
|
||||||
solargraph-list-versions() {
|
|
||||||
rbenv each -v gem list -q solargraph
|
|
||||||
}
|
|
||||||
|
|
||||||
rubygems-upgrade() {
|
|
||||||
rbenv each -v gem update --system
|
|
||||||
}
|
|
||||||
|
|||||||
3
zshenv
3
zshenv
@@ -186,9 +186,6 @@ fi
|
|||||||
# Use custom tmux install if available
|
# Use custom tmux install if available
|
||||||
path_prepend "/opt/tmux/bin"
|
path_prepend "/opt/tmux/bin"
|
||||||
|
|
||||||
# Ruby setup for rbenv (./zsh/ruby.zsh)
|
|
||||||
path_prepend "$HOME/.rbenv/shims"
|
|
||||||
|
|
||||||
# Rust setup
|
# Rust setup
|
||||||
export RUSTUP_HOME="$HOME/.rustup"
|
export RUSTUP_HOME="$HOME/.rustup"
|
||||||
export CARGO_HOME="$HOME/.cargo"
|
export CARGO_HOME="$HOME/.cargo"
|
||||||
|
|||||||
Reference in New Issue
Block a user