LoginSignup
1

More than 5 years have passed since last update.

MacにHomebrew・Rubyを入れる

Last updated at Posted at 2017-06-10

以下からHomebrewと呼ばれるパッケージ管理システムを導入する。
Homebrew — macOS 用パッケージマネージャー

導入が終わったら、PATHの更新を忘れずに。
echo 'export PATH=/usr/local/bin:$PATH' >> .bash_profile
source ~/.bash_profile

次はrbenv + ruby-buildのインストールを。
rbenvはローカルディレクトリ毎にRubyのバージョンを変更できるので便利。
rbenvのgemパッケージを検索。(たまに名前が変わるので注意)
brew search rbenv-gem

今回はrbenv-gemsetでした。こちらをインストール。
brew install rbenv-gemset ruby-build

導入が終わったら、PATHの更新を忘れず(ry
echo 'export PATH=/usr/local/bin:$PATH' >> .bash_profile
source ~/.bash_profile

最後はお待ちかね、Rubyのインストール。(バージョンはお好みで)
rbenv install 2.2.3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1