Step-by-step guide to setting up Ruby with Rbenv on Pop!_OS 22.04

Step-by-step guide to setting up Ruby with Rbenv on Pop!_OS 22.04


rbenv is a lightweight Ruby version management tool. It allows you to easily install, manage, and switch between different versions of Ruby on your system.

This is particularly useful for developers who may need to work on projects that require different Ruby versions or need to keep their development environment in sync with specific Ruby versions.

With rbenv, you can set a Ruby version on a per-project basis, ensuring that each project uses the appropriate version of Ruby.

This helps in avoiding conflicts between projects that might require different Ruby versions and ensures consistency across your development environment.

Update your OS

sudo apt update

Install the dependencies

sudo apt install git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev

Install rbenv

curl -fsSL | bash


Add rbenv to $PATH

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc


Load rbenv

echo 'eval "$(rbenv init -)"' >> ~/.bashrc


Apply changes to current session

source ~/.bashrc


Verify installation

type rbenv


List all possible Ruby versions

rbenv install --list-all


Install ruby

rbenv install 2.6.3


Set default version

rbenv global 2.6.3
ruby -v



Well-done. You did a great job!

Casts Of The Office Celebration Dance GIF |

Let's network

Final thoughts

Thank you for reading this article.

If you have any questions, thoughts, suggestions, or corrections, please share them with us.

We appreciate your feedback and look forward to hearing from you.

Feel free to suggest topics for future blog articles. Until next time!