<aside> 💡 はじめに:本ドキュメントではMacOS向けにRailsインストールの手順について解説します。他のOSである場合も大まかな流れは同じですので軽く目を通して頂くと「何をインストールすれば良いか」「どのような設定が必要か」といった流れが掴めると考えます。
Windowsでのインストール手順について、丁寧に解説されていて比較的新しいサイトのリンクを以下に記載しました。Windowsユーザーの方はこちらもご参考になればと思います。 Ruby on Railsインストール(Windows10)
</aside>
目次
Command Line Toolsは後述するHomebrewをインストールするために必要なツールです。
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
// バージョン確認
$ xcode-select -v
xcode-select version 2392.
HomebrewはmacOS用のパッケージマネージャー(ソフトウェアを一括で管理するシステム)です。
$ /bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"
==> Checking for `sudo` access (which may request your password)...
Password:
.
.
.
// バージョン確認
$ brew -v
Homebrew 3.5.1
Homebrew/homebrew-core (git revision e4ec445c050; last commit 2022-06-12)
Homebrew/homebrew-cask (git revision 13eff273c6; last commit 2022-06-12)
rbenvは複数のRubyバージョンのインストール、管理してくれるツールです。
Homebrewからインストールします。
$ brew install rbenv
Running `brew update --auto-update`...
==> Downloading <https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19>
######################################################################## 100.0%
.
.
.
// バージョン確認
$ rbenv -v
rbenv 1.2.0