Install Rbenv and Ruby on elementary os, quick and dirty.

Subscribe to my newsletter and never miss my upcoming articles

I couldn't find a solid set of instructions on how to do this so I decided to write it up quick. I did find a lot of tutorials for Ubuntu, but they seemed to encounter errors on elementary OS.

This is basically a lot of copy paste. I've gone through all the steps on elementary and it works like a charm.

  1. cd
  2. git clone ~/.rbenv
  3. git clone ~/.rbenv/plugins/ruby-build
  4. Open your .bashrc with nano nano .bashrc
  5. make sure you type or past the following lines into the bottom of your .bashrc
    # rbenv
    export PATH="$HOME/.rbenv/bin:$PATH"
    eval "$(rbenv init -)"
    export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
  6. ctrl-o to save
  7. ctrl-x to quit
  8. source .bashrc
  9. rbenv install 2.7.1
  10. rbenv gloabal 2.7.1
  11. Verify ruby -v

From here you should be able to install Rails or any other gems you wish.

Like I said, quick and dirty. I hope this helps people so they don't have to dig around as much for instruction.

--Cheers Tim

No Comments Yet