💥 RVM Recommanded :
- ✅ Run the following script on your mac :
# without proxy
curl -L https://get.rvm.io | bash -s stable
# Install rvm
https_proxy=$PROXY http_proxy=$PROXY curl -L https://get.rvm.io | bash -s stable- ✅ Open .zshrc and copy this at the end of the file :
source /Users/$(whoami)/.rvm/scripts/rvm- ✅ Run this commands
VERSION=2.6.5
# Install Ruby (https://www.ruby-lang.org/en/downloads/)
rvm install ruby-$VERSION
# use a ruby version
rvm use ruby-$VERSION
# default ruby version
rvm --default use $VERSION- ✅ Check now the ruby version
ruby -v(Output need to be : ruby 2.6.5 ...)
💥 RBENV :
- Install and configure rbenv
brew install rbenvthen add this 2 line to .zshrc or .bashrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"- Install ruby version 2.7.4
rbenv install 2.7.4- Set Global ruby version
rbenv global 2.7.4- Install latest version of bundler
gem install bundler:2.2.19 -n /usr/local/binSet local ruby version
rbenv local 2.7.4If you need to run bundle install you need to run instead this :
bundle install --path vendor/bundle