LoginSignup
1
1

More than 5 years have passed since last update.

Macに Ruby2.3.1 & npm をインストールする

Last updated at Posted at 2017-11-16

概要

MacOSX にrbenvをインストールする作業のメモ

rbenvのインストール

$ brew update
$ brew install rbenv ruby-build
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv --version
rbenv 0.4.0
$ rbenv rehash


Rubyの2.3.1をインストールする

$ rbenv install --list  
Available versions:
         ・
      2.3.0
      2.3.1
      2.3.2
         ・
$ rbenv install 2.3.1

現在のRubyのバージョン確認

$ rbenv versions
      1.9.3-p547
    * 2.3.1 (set by /home/user/.rbenv/version)

Ruby バージョンの選択

$ rbenv global 2.3.1
$ rbenv version
2.3.1 (set by /home/hoge/.rbenv/version)

Bundlerのインストール

$ rbenv exec gem install bundler

node.jsのインストール

npmコマンドを使えるようにするために、node.jsをインストールする

$ brew install node
$ which npm
/usr/local/bin/npm

参考サイト

1
1
0

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
1