Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS

Introduction

I tried to build an environment of dramatically evolved Ruby 3 and Rails 6.1. I want to make it a development environment for everyday use, so The OS is "Ubuntu desktop 20.04.1 LTS remix Japanese version".

environment

Update the current environment to the latest state.

$ sudo apt update -y
$ sudo apt upgrade -y

Install the packages required for development and the packages required for Ruby on Rails.

$ sudo apt-get -y install git curl g++ make libyaml-dev libxml2-dev libxslt-dev sqlite3 libsqlite3-dev nodejs npm
$ sudo apt install build-essential -y
$ sudo apt install -y libssl-dev libreadline-dev zlib1g-dev

Set up a Git account.

$ git config --global user.name <user name>
$ git config --global user.email <email address>
$Install rbenv (package management tool).
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

Set the environment variable Path.

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc

Restart the shell.

$ exec $SHELL -l
$ ruby-Install build.
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Install Ruby

$ rbenv install 3.0.0
$ rbenv global 3.0.0

Yarn installation

$ sudo apt install curl

Rails installation

$ gem install -v 6.1.0 rails

Until now, I've only used Ruby on Rails 3 because of my work. I would like to try Ruby3 performance and Webpacker supported by Rails 5.1 in this environment.

Recommended Posts

Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
[Ruby] Building a Ruby development environment on Ubuntu
[Procedure 1 for beginners] Ruby on Rails: Construction of development environment
Build a development environment where Ruby on Rails breakpoints work on Windows
Install Rails in the development environment and create a new application
Creating a dual boot environment for Ubuntu Server 20.04.1 LTS and Windows 10
Steps to build a Ruby on Rails development environment with Vagrant
A story I was addicted to before building a Ruby and Rails environment using Ubuntu (20.04.1 LTS)
Build a development environment for Docker + Rails6 + Postgresql
Building a Ruby environment for classes on Mac
Ruby on Rails development environment construction on M1 Mac
Let's install Docker on Windows 10 and create a verification environment for CentOS 8!
How to build a Ruby on Rails environment using Docker (for Docker beginners)
[Ruby on Rails] Create a pie chart for each column with Chartkick
[Docker] How to create a virtual environment for Rails and Nuxt.js apps
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)
Template: Build a Ruby / Rails development environment with a Docker container (Ubuntu version)
Create a Java development environment using jenv on Mac
[Introduction] Try to create a Ruby on Rails application
[Environment construction] Ruby on Rails 5.2 system development environment construction [within 1 hour]
Docker the development environment of Ruby on Rails project
Let's create a gcloud development environment on a centos8 container
Build a development environment to create Ruby on Jets + React apps with Docker
(Ruby on Rails6) How to create models and tables
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Create an environment for Tomcat and Postgres on a Chromebook without using developer mode
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
Difficulties in building a Ruby on Rails environment (Windows 10) (SQLite3)
Definitely useful! Debug code for development in Ruby on Rails
Explanation of Ruby on rails for beginners ③ ~ Creating a database ~
Create a Java and JavaScript team development environment (gradle environment construction)
Installing Ruby + Rails on Ubuntu 18.04 (rbenv)
Build a XAMPP environment on Ubuntu
Build a local development environment for Rails tutorials with Docker-Introduce Bootstrap and Font Awesome with Webpack-
Build TensorFlow 2.3.1 from source on Ubuntu20.04 LTS and create a shared library in C ++ language
Ruby on Rails --From environment construction to simple application development on WSL2
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
Procedure for building a Rails application development environment with Docker [Rails, MySQL, Docker]
I tried to create a Spring MVC development environment on Mac
(Ruby on Rails6) Creating a database and displaying it in a view
Explanation of Ruby on rails for beginners ⑤ ~ Edit and delete database ~
Create a Docker Image for redoc-cli and register it on Docker Hub
(Ruby on Rails6) Create a function to edit the posted content
Building a Deep Learning environment (Ubuntu 20.04 LTS)
Create Spring Boot development environment on Vagrant
[Ruby on Rails] About bundler (for beginners)
Let's create a Java development environment (updating)
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
Ruby on Rails controller create / delete command
Explanation of Ruby on rails for beginners ①
Beginners create portfolio in Ruby on Rails
Muscle Ruby on Rails Day 1 ~ Environment Construction ~
Build debug environment on container --Build local development environment for Rails tutorial with Docker-
How to create a query using variables in GraphQL [Using Ruby on Rails]
Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
Building a development environment for Flutter on Win10 --- Flutter SDK Install (2020 preservation version)
I was a little addicted to running old Ruby environment and old Rails
Build a local development environment for Rails tutorials with Docker (Rails 6 + PostgreSQL + Webpack)
Ruby on Rails ✕ Docker ✕ MySQL Introducing Docker and docker-compose to apps under development
Create a java web application development environment with docker for mac part2