fix(mise/ruby): move global gems back to shell helper

Mise is only suitable for gems which expose self-contained CLI tools that don't interact with other Ruby-based tools.

Because it sets GEM_HOME to the specific gem's install path, things like `foreman` cannot launch Rails apps, cause any Ruby-based child processes will not find any gems they expect.
This commit is contained in:
Jim Myhrberg
2025-05-05 13:45:57 +01:00
parent d2ee3df9ed
commit 56c3b49bef
2 changed files with 30 additions and 13 deletions

View File

@@ -41,19 +41,6 @@ ruby_install = true
"cargo:eza" = "latest"
"cargo:kubectl-watch" = "latest"
"cargo:paper-terminal" = "latest"
"gem:dotenv" = "latest"
"gem:erb_lint" = "latest"
"gem:foreman" = "latest"
"gem:reek" = "latest"
"gem:rubocop" = "latest"
"gem:ruby-lsp" = "latest"
"gem:ruby-lsp-rails" = "latest"
"gem:solargraph" = "latest"
"gem:solargraph-rails" = "latest"
"gem:syntax_tree" = "latest"
"gem:syntax_tree-haml" = "latest"
"gem:syntax_tree-rbs" = "latest"
"gem:yard" = "latest"
"go:github.com/rakyll/hey" = "latest"
"go:google.golang.org/grpc/cmd/protoc-gen-go-grpc" = "latest"
"go:google.golang.org/protobuf/cmd/protoc-gen-go" = "latest"

View File

@@ -39,3 +39,33 @@ alias he="heroku"
alias f="foreman"
alias fs="foreman start"
alias fr="foreman run"
# ==============================================================================
# global ruby packages
# ==============================================================================
install_ruby_global_packages() {
local packages=(
'bundler:~> 1.0'
'bundler:~> 2.0'
bundler-audit
dotenv
erb_lint
foreman
method_source
pry-doc
reek
rubocop
ruby-lsp
ruby-lsp-rails
solargraph
solargraph-rails
steep
syntax_tree
syntax_tree-haml
syntax_tree-rbs
yard
)
gem install --no-document "${packages[@]}"
}