Skip to content

Codecast: Install RVM and Ruby with Troubleshooting

In this setup and configuration codecast, Mike installs RVM, Ruby 2.7 and Ruby 3.0 on a new Ubuntu 20.04 desktop.

This video covers:

0:02:06 – Install gpg2

sudo apt install gnupg2 

0:02:37 -Import the RVM GPG keys

gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB 

0:02:44 -Add the RVM PPA

sudo apt-add-repository -y ppa:rael-gc/rvm 

0:03:58 -Install RVM

sudo apt install rvm 

0:04:36 -Add user to the RVM group

sudo usermod -a -G rvm "$USER" 

(or by specific username if not the current running user or adding multiple users)

0:05:17 – List known Ruby versions

rvm list known 

0:06:34 -Install Ruby Dependencies:

sudo apt install -y autoconf bison build-essential curl g++ gcc git libffi-dev libgconf-2-4 libgdbm-dev libncurses5-dev libreadline-dev libsqlite3-dev libssl-dev libxi6 libyaml-dev make sqlite3 xvfb zip zlib1g-dev 

0:09:35 – Troubleshoot: TL;DR REBOOT YOUR MACHINE In the video Mike struggles through permission denied issues when trying to install Ruby with RVM. Reboot your machine after installing RVM and before trying to install Ruby. Logging out and logging back in will not work.

0:11:39 – Locate helpful Stack Overflow post Installing RVM: getting error “There was an error(23).”

rvm fix-permissions 

0:12:34 REBOOT THE MACHINE

0:13:16 – Ensure .rvm/user/installs

mkdir -p ~/.rvm/user/installs 

(directories are created separately in the video, but this is more efficient)

0:13:03 -Install Ruby 2.7.2 and reinstall after ensuring ~/.rvm/user/installs

rvm install 2.7.2

0:14:06rvm reinstall ruby-2.7.2

0:14:48 – Install 3.0.0

rvm install 3.0.0 

0:15:25 – Set 3.0.0 as default

rvm list rvm use 3.0.0 --default

0:16:00 – Validate Ruby

ruby -v 
# ruby 3.0.0p0...
irb 
# 3.0.0 :001 >

2 responses to “Codecast: Install RVM and Ruby with Troubleshooting

Leave a Reply