Move to Federated Gitea
This commit is contained in:
54
install-mise-ruby-rails.sh
Executable file
54
install-mise-ruby-rails.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
# set -e
|
||||
|
||||
#====================================================================================
|
||||
# Install Mise
|
||||
#====================================================================================
|
||||
|
||||
# Check if Mise is already installed
|
||||
if ! command -v mise &> /dev/null; then
|
||||
echo "Installing Mises"
|
||||
curl https://mise.run/bash | sh
|
||||
else
|
||||
echo "Mises is installed"
|
||||
fi
|
||||
|
||||
eval "$($HOME/.local/bin/mise activate bash)"
|
||||
|
||||
source ~/.bashrc
|
||||
|
||||
#====================================================================================
|
||||
# Install Ruby
|
||||
#====================================================================================
|
||||
|
||||
# Check if Ruby is already installed
|
||||
if ! command -v ruby &> /dev/null; then
|
||||
echo "Installing Ruby"
|
||||
mise install ruby@latest
|
||||
mise use -g ruby@latest
|
||||
|
||||
# Explicitly add shims to PATH
|
||||
export PATH="$HOME/.local/share/mise/shims:$PATH"
|
||||
|
||||
# Force reshim
|
||||
$HOME/.local/bin/mise reshim
|
||||
|
||||
source "$HOME/.bashrc"
|
||||
|
||||
gem install bundler
|
||||
else
|
||||
echo "Ruby is installed"
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# Install Rails
|
||||
#====================================================================================
|
||||
|
||||
# Check if Rails is already installed
|
||||
if ! command -v rails &> /dev/null; then
|
||||
echo "Installing Rails"
|
||||
gem install rails
|
||||
else
|
||||
echo "Rails is installed"
|
||||
fi
|
||||
Reference in New Issue
Block a user