Rails6 development environment construction [Mac]

Introduction

This is a remarks of the procedure performed when building the development environment for Rails 6 using Mac.

procedure

1. Install Homebrew

** A system that manages software installation and uninstallation ** https://brew.sh/index_ja スクリーンショット 2020-05-24 15.52.20.png Copy the command at the bottom of Install Homebrew and run it in the terminal

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

You will be asked for a password, so enter the password when you start your Mac

Next, enter the following command and execute it to pass the Homebrew path.

$ echo ‘export PATH=/usr/local/bin:$PATH’ >> .bash_profile source .bash_profile

Finally, execute the following command for confirmation

$ brew ­-v

Homebrew ○.○.○ If the version is displayed like

2. Install rbenv

** Tool to switch Ruby version control ** Install using Homebrew


#Initial setting
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

#Reflect the initial settings
$ source ~/.bash_profile

#Install rbenv
$ brew install rbenv ruby-build

#Ruby version list display
$ rbenv install -l
2.5.8
2.6.6
2.7.1
...

#Install the specified Ruby version
$ rbenv install 2.7.1


#Run and make it available when you install a new Ruby or gem
$ rbenv rehash

Ruby version to use

$ rbenv global 2.7.1

3. Install Bundler

** A tool for managing gem dependencies and versions **

$ gem install bundler

4. Install Rails

$ gem install rails

5. Yarn installation

Required for installing webpacker

brew install yarn

6. Install webpacker

Since webpacker has become a standard specification from Rails6, it is necessary to install yarn.

$ rails webpacker:install

7. Operation check

#Create a Rails project
$ rails new sample

#Go to Rails project
$ cd sample

#Launch a Rails project
$ rails server

http://localhost:3000/ Complete if the Rails page can be displayed

Recommended Posts

Rails6 development environment construction [Mac]
[Rails / MySQL] Mac environment construction
Ruby on Rails development environment construction on M1 Mac
Rails Docker environment construction
Laravel development environment construction with Docker (Mac)
Java development environment construction memo on Mac
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
java development environment construction
Rails engineer environment construction ruby2.7.1
Rails environment construction Rails5.2.1 ruby2.5.1 Catalina
Java development environment (Mac, Eclipse)
[Docker] Rails 5.2 environment construction with docker
[Environment construction] Ruby on Rails 5.2 system development environment construction [within 1 hour]
[Mac] VS Code development environment construction (Java, Gradle, Node.js)
Stable development environment construction manual for "Rails6" with "Docker-compose"
[Environment construction Mac] Ruby on Rails (+ Webpacker handles errors)
Rails + MySQL environment construction with Docker
Environment construction for Servlet application development
Ruby environment construction summary ~ mac version ~
[Unity] Android development environment construction procedure
Ruby on Rails 6.0 environment construction memo
Build Java development environment (for Mac)
Rails on Docker environment construction procedure
[Environment construction with Docker] Rails 6 & MySQL 8
[Java & SpringBoot] Environment Construction for Mac
Java development environment (Mac, VS Code)
Troublesome Rails environment construction flow [Windows 10]
[Environment construction] Uninstall rails from local
[Rails] AWS EC2 instance environment construction
Install Java development environment on Mac
[Procedure 1 for beginners] Ruby on Rails: Construction of development environment
[Environment construction] Get the Ruby on Rails 6 development environment within 1 hour
Rails application development environment construction with Docker [Docker, Rails, Puma, Nginx, MySQL]
CentOS8 + Anaconda + Django development environment construction procedure
[Processing x Java] Construction of development environment
Ruby on Rails --From environment construction to simple application development on WSL2
Rails environment construction with Docker (personal apocalypse)
Spring Boot environment construction memo on mac
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
Sapper × Go (echo) × Docker development environment construction
[Java] Environment construction
Universal Robotics UR Caps development environment construction
Rails API server environment construction using docker-compose
Java environment construction
Java development environment
What is Java and Development Environment (MAC)
Build a Java development environment on Mac
Spring Boot + Docker Java development environment construction
Rails Development Transition 2020
[ev3 × Java] leJOS development environment construction (Eclipse on Mac OSX / bluetooth)
[Spring] Environment construction
Rails & React & Webpacker & MySQL Environment Construction Manual
Docker environment construction
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)
How to solve the local environment construction of Ruby on Rails (MAC)!
Template: Build a Ruby / Rails development environment with a Docker container (Mac version)
Build a development environment for Docker + Rails6 + Postgresql
[Jakarta EE 8 application development with Gradle] 1. Environment construction