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 [email protected] readline libyaml gmp
rbenv install 3.2.1 --verbose
rbenv global 3.2.1
gem install rails
bundle install
./bin/dev