Skip to content

Instantly share code, notes, and snippets.

@okabe-yuya
Last active May 7, 2020 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okabe-yuya/cd176a56b2c1a2c19d0951e761ab60d7 to your computer and use it in GitHub Desktop.
Save okabe-yuya/cd176a56b2c1a2c19d0951e761ab60d7 to your computer and use it in GitHub Desktop.

rbenv is Ruby version manager

install rbenv

一応update

$ brew update

permisson errorとなる場合があるため、sudoで実行

$ sudo brew install rbenv ruby-build

set PATH for rbenv in .zshrc(bashであれば.bash_profile)

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

install ruby in rbenv

install可能なversionの確認

$ rbenv versions

eg: 2.5.6をinstallしたい場合

$ rbenv versions | grep "2.5.6"
2.5.6

install

$ rbenv install 2.5.6

(installがめちゃくちゃ遅い...)

Ref: https://qiita.com/hellhellmymy/items/fccbc17e20323c5c8a8d

set version ruby in rbenv

$ rbenv global 2.5.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment