Ruby environment construction summary ~ mac version ~

Introduction

I bought a new mac and had the opportunity to recreate the Ruby environment, so I will summarize it as a memorandum.

Install Homebrew

First, install homebrew. (People who have already installed it are okay)


/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Run this command in the terminal to complete the installation.

wget installation

Install wget.


brew install wget

Ruby installation

After installing wget, we will start installing Ruby. As a procedure --Install rbenv with homebrew --Pass --Installing ruby I feel said. Now, let's install rbenv.


brew install rbenv
brew install ruby-build

Execute these two commands to install. After the installation is complete, go through the path.


echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc
source ~/.zshrc

You have now passed the rbenv installation and path. Finally, I will install Ruby.

rbenv install --list
rbenv install 2.6.6
rbenv rehash
rbenv global 2.6.6

You can check the list of Ruby versions that can be downloaded with the first command. Specify the version of Ruby to download with the second command. (I chose 2.6.6 this time) The third command reloads rbenv, and the fourth command specifies the version to use by default.

After all the work is done, at the terminal

ruby -v

Please check if you have the version you specified earlier. If not, the path may not be working properly, so please check zshrc.

Recommended Posts

Ruby environment construction summary ~ mac version ~
Ruby on Rails development environment construction on M1 Mac
Rails6 development environment construction [Mac]
Rails engineer environment construction ruby2.7.1
Rails environment construction Rails5.2.1 ruby2.5.1 Catalina
Offline environment construction Ruby edition
[Super easy] Ruby environment construction
[Rails / MySQL] Mac environment construction
[Environment construction Mac] Ruby on Rails (+ Webpacker handles errors)
Ruby on Rails 6.0 environment construction memo
[Java & SpringBoot] Environment Construction for Mac
AWS Cloud9 environment construction Update Ruby to the latest stable version
GPU environment construction with Docker [October 2020 version]
Spring Boot environment construction memo on mac
Laravel development environment construction with Docker (Mac)
Java development environment construction memo on Mac
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
Scala starting from scratch (environment construction mac)
Muscle Ruby on Rails Day 1 ~ Environment Construction ~
CentOS8.2 (x86_64) + ruby2.5 + Rails5.2 + MariaDB (10.3.17) environment construction
[Environment construction] Spring Tool Suite4 installation (Mac)
Environment construction summary with rvm and postgresql
[Java] Environment construction
Java environment construction
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
How to solve the local environment construction of Ruby on Rails (MAC)!
Ruby syntax summary
[Spring] Environment construction
Docker environment construction
Template: Build a Ruby / Rails development environment with a Docker container (Mac version)
Spring Boot environment construction with Docker (January 2021 version)
Summary of Java environment settings for myself [mac]
Building a Ruby environment for classes on Mac
[Personal memo] Ruby on Rails environment construction (Windows)
[Ruby on Rails] Let's build an environment on mac
Penronse environment construction [Windows]
[Environment construction] Eclipse installation
[Environment construction] Ruby on Rails 5.2 system development environment construction [within 1 hour]
[Flutter] Ubuntu 20.04 environment construction
Java development environment construction on Mac-JDK Install (2020 preservation version)
Rails Docker environment construction
[Mac] VS Code development environment construction (Java, Gradle, Node.js)
Deploy to Ruby on Rails Elastic beanstalk (Environment construction)
Circle CI environment construction
java development environment construction
Ruby on Rails environment construction using VirtualBox, Vagrant, cyberduck
[Ruby] Method definition summary
From 0 to Ruby on Rails environment construction [macOS] (From Homebrew installation to Rails installation)
[Procedure 1 for beginners] Ruby on Rails: Construction of development environment
[Environment construction] Get the Ruby on Rails 6 development environment within 1 hour
Learning Java framework # 1 (Mac version)
ruby qualification test point summary
Ruby version switching with rbenv
EC-CUBE4 environment construction (local edition)
I tried node-jt400 (Environment construction)
MySQL 5.7 (Docker) environment construction memo
Ruby version does not switch
Introduction to Metabase ~ Environment Construction ~
Update Ruby in Unicorn environment
Java development environment (Mac, Eclipse)
JavaFX environment construction in Java 13