$ sudo apt-get install git gcc build-essential libreadline-dev zlib1g-dev
$ sudo apt-get install libssl1.0-dev
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo ‘export PATH=”$HOME/.rbenv/bin:$PATH”‘ >> ~/.bash_profile
$ echo ‘eval “$(rbenv init -)”‘ >> ~/.bash_profile
$ exec $SHELL -l
vagrant@vagrant-ubuntu-trusty-64:~/bitcoin$ rbenv -v
rbenv 1.1.2-11-gc46a970
vagrant@vagrant-ubuntu-trusty-64:~/bitcoin$ rbenv install 2.0.0-p643
Downloading ruby-2.0.0-p643.tar.bz2…
-> https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p643.tar.bz2
Installing ruby-2.0.0-p643…
WARNING: ruby-2.0.0-p643 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
Installed ruby-2.0.0-p643 to /home/vagrant/.rbenv/versions/2.0.0-p643
vagrant@vagrant-ubuntu-trusty-64:~/bitcoin$ rbenv rehash
vagrant@vagrant-ubuntu-trusty-64:~/bitcoin$ rbenv versions
* system (set by /home/vagrant/.rbenv/version)
2.0.0-p643
vagrant@vagrant-ubuntu-trusty-64:~/bitcoin$ rbenv global 2.0.0-p643
vagrant@vagrant-ubuntu-trusty-64:~/bitcoin$ ruby -v
ruby 2.0.0p643 (2015-02-25 revision 49749) [x86_64-linux]