git clone https://github.com/rbenv/rbenv.git ~/.rbenv
For .bashrc:
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
For .bash_profile:
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bash_profile
For ZSH:
echo 'eval "$(~/.rbenv/bin/rbenv init - zsh)"' >> ~/.zshrc
Add to your .bashrc/.bash_profile/.zshrc
eval "$(rbenv init -)"
restart terminal
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
brew install openssl@1.1 readline libyaml gmp
rbenv install 3.2.1 --verbose
rbenv global 3.2.1
gem install rails
bundle install
./bin/dev