My profile: https://about.me/alexandrecalaca
1. Update your system
sudo apt-get update
2. Install build-essential
sudo apt-get install -y build-essential
3. Install rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
4. Install ruby-build
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
**5. Add to ~/.bash_"
$ echo 'export PATH="~/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
**6. **
shopt -s expand_aliases
source ~/.bashrc
7. Verify rbenv installation
type rbenv
You should get a message saying that rbenv is a function
8.Verify rbenv versions
rbenv versions
9. Verify current ruby version
ruby -v
10.Install another ruby version
rbenv install 2.5.0
11. Verify all rbenv install versions
rbenv versions
12.Set a new local version
rbenv local 2.5.0
If you get a permission error, close and reopen your terminal and workspace.
**13. Finally, check your current rbenv version"
rbenv version
14. Way to go!