Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to install rbenv

📅 2015-Feb-12 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ rbenv ⬩ 📚 Archive

rbenv seems to be the preferred tool currently to create and maintain a Ruby environment. It helps install and maintain any version of the Ruby interpreter and other tools. Ubuntu ships with ancient versions of rbenv, so it is not recommended to try that. Instead, installing its source from Github and keeping it updated using Git seems to be the preferred method.

Installing rbenv

$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ exec $SHELL
$ rbenv
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Updating rbenv

Just update from Github:

$ cd ~/.rbenv
$ git pull

Tried with: rbenv 0.4.0 and Ubuntu 14.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧