Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to install Ruby

📅 2015-Feb-13 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

Ubuntu ships with ancient versions of the Ruby interpreter and its tools. The preferred method to installing the latest version of Ruby from source is using rbenv.

$ rbenv install -l
$ rbenv install 2.1.5

Trying the latest 2.2.0 gave build errors on my system, but I was able to install 2.1.5.

$ rbenv global 2.1.5
$ ruby --version

Now you can also install other gems using the gem tool that is also built along with Ruby.

Tried with: rbenv 0.4.0 and Ubuntu 14.04