$ sudo apt-get install gnupg2 -y $ sudo gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv $ cd ~/.rbenv/ $ sudo src/configure $ sudo ./configure $ sudo make
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc $ ~/.rbenv/bin/rbenv init $ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
$ mkdir -p "$(rbenv root)"/plugins $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
$ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
$ rbenv install --list $ rbenv install 2.61