DEV Community

Tim Apple
Tim Apple

Posted on

2 1

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

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 https://github.com/rbenv/rbenv.git ~/.rbenv
  3. git clone https://github.com/rbenv/ruby-build.git ~/.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
esac
# rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
Enter fullscreen mode Exit fullscreen mode
  1. ctrl-o to save
  2. ctrl-x to quit
  3. source .bashrc
  4. rbenv install 2.7.1
  5. rbenv gloabal 2.7.1
  6. 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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay