Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04

Ubuntu 20.04 summarizes the minimum steps to set up a Ruby environment with rbenv.

Premise

--Immediately after installing Ubuntu 20.04 --The shell is Bash --Internet connection environment

Installation

rbenv + library

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="~/.rbenv/bin:$PATH"' >> ~/.bashrc
~/.rbenv/bin/rbenv init >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
apt install -y build-essential libssl-dev zlib1g-dev

Install with rbenv

rbenv install 2.7.1
rbenv global 2.7.1

rbenv update

The rbenv itself also needs to be updated. You can do it with one liner.

(cd "$(rbenv root)" ; git pull ; cd "$(rbenv root)"/plugins/ruby-build ; git pull)

Afterword

I am considering graduating from WLinux.

Reference information

EoT

Recommended Posts

Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
Steps to build a Ruby on Rails development environment with Vagrant
Steps to set up a VNC server on CentOS 8.3
Install ruby on Ubuntu 20.04 with rbenv
[Ruby] Building a Ruby development environment on Ubuntu
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
How to build a Pytorch environment on Ubuntu
Build a development environment to create Ruby on Jets + React apps with Docker
Steps to set up Postfix and Dovecot on CentOS 8.3
Install rbenv with apt on ubuntu and put ruby
Set up ansible-playbook on Ubuntu 20.04
Set up a MineCraft Paper server on Ubuntu 20.04.1 LTS ② Update
Set up Django on Ubuntu 16.04 with PostgreSQL and Gunicorn on ECS
How to set up a proxy with authentication in Feign
Installing Ruby + Rails on Ubuntu 18.04 (rbenv)
[Ubuntu] Set up a Nukkit server
Build a XAMPP environment on Ubuntu
A story of frustration trying to create a penetration environment on Ubuntu 20.04
I want to add a browsing function with ruby on rails
Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
Set up ImpressPages 5.0 with LAMP on CentOS 7.3
Steps to set a favicon in Rails
How to build a Ruby on Rails environment using Docker (for Docker beginners)
Notes on what to do when EC2 is set up with t2.micro
Template: Build a Ruby / Rails development environment with a Docker container (Ubuntu version)
A memorandum to clean up the code Ruby
Write a dockerfile to start jupyter-lab on ubuntu
Building a Ruby environment for classes on Mac
Set up an SSH server on WSL2 Ubuntu 20.04
Rip a CD to MP3 with Ubuntu 18.04 LTS
Set up a CentOS virtual server with Vagrant
I made a portfolio with Ruby On Rails
Steps to set up Jenkins on your local Mac, create one job and succeed
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
Docker command to create Rails project with a single blow in environment without Ruby
I want to hit the API with Rails on multiple docker-composes set up locally
Memo to build a Servlet environment on AWS EC2
[Introduction] Try to create a Ruby on Rails application
Build a Ruby on Rails development environment on AWS Cloud9
[Android / Java] Set up a button to return to Fragment
Setting up the FreeBSD desktop environment on Ubuntu + qemu
AtCoder Beginner Contest 170 A, B, C up to ruby
Deploy to Ruby on Rails Elastic beanstalk (Environment construction)
Install Ruby on Ubuntu 20.04
A story I was addicted to before building a Ruby and Rails environment using Ubuntu (20.04.1 LTS)
How to set environment variables when using Payjp with Rails
I tried to create a java8 development environment with Chocolatey
From 0 to Ruby on Rails environment construction [macOS] (From Homebrew installation to Rails installation)
Difficulties in building a Ruby on Rails environment (Windows 10) (SQLite3)
How to divide a two-dimensional array into four with ruby
[Ruby on Rails] Add a column with a foreign key constraint
Learning Ruby with AtCoder 13 How to make a two-dimensional array
A series of steps to create portfolio deliverables with Rails
How to display a graph in Ruby on Rails (LazyHighChart)
Case that gave up environment construction of react with ubuntu
A memo to build Jitsi Meet on Azure with docker-compose
Build a CentOS 8 virtual environment on your Mac with VirtualBox
I tried to automate LibreOffice Calc with Ruby + PyCall.rb (Ubuntu 18.04)
Build mate desktop environment on ec2 with terraform (Ubuntu 20.04LTS)
Build a Node-RED environment with Docker to move and understand