This installation utilizes rbenv to run ruby. If you are ok with that, let's type cmd + space
to launch Terminal
to perform the next block of installations in your home directory.
- Setup Ruby via
brew install rbenv
- Following the guide on the repo create the
.rbenv
directory.rbenv init
and theneval "$(rbenv init -)"
. - Create the rbenv plugin directory
mkdir $(rbenv root)/plugins
. - Install rbenv-default-gems plugin
git clone https://github.com/rbenv/rbenv-default-gems.git $(rbenv root)/plugins/rbenv-default-gems
. - Install rbenv/rbenv-gem-rehash plugin
git clone https://github.com/sstephenson/rbenv-gem-rehash.git $(rbenv root)/plugins/rbenv-gem-rehash
. - Install rbenv-vars plugin
git clone https://github.com/rbenv/rbenv-vars.git $(rbenv root)/plugins/rbenv-vars
. - Install rbenv-update plugin
git clone https://github.com/rkh/rbenv-update.git $(rbenv root)/plugins/rbenv-update
. - Install a few common versions of ruby. Please note you can run
rbenv install -l
to see the current versions available. I installed the following: 2.7.5, 3.0.3, and 3.1.0 and the time this guide was compiled. - Run
rbenv global 2.7.5
to setup the global version of ruby. - If this is a new machine migrated from an older box, make sure to copy over the
.rbenv/vars
file so you do not lose passwords. - Setup pre-gems for our IDE at this time:
gem install rsense
. - Verify global rbenv vars are setup correctly. Type
nano $HOME/.rbenv/vars
and confirm the following. Adjust if necessary. Once completed, typerbenv vars
and you should seeexport GEM_PATH='bundle'
.
#GLOBAL
GEM_PATH=.bundle