LoginSignup
0
0

More than 5 years have passed since last update.

anyenvを導入しました。

Posted at

anyenvを導入しました。

ndenv とか rbenv を導入していて色々面倒になったので、anyenv で一元管理するようにしました。
いろんな人が書いてますが、今後も忘れないように自分用に作業ログを残しておきます。

自分がやったことは主に4STEP

  • 既存の〇〇envの削除
  • anyenvのインストール
  • ndenvの導入
  • rbenvの導入
  • 確認

既存の〇〇envの削除

  • ~/.bash_profileにある記載を全部削除
  • brewで導入していた○○envをアンインストール

anyenvのインストール

# 公式に載ってますのでコピペです。
$ git clone https://github.com/riywo/anyenv ~/.anyenv
$ echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.your_profile
$ echo 'eval "$(anyenv init -)"' >> ~/.your_profile
$ exec $SHELL -l

ndenvの導入

$ anyenv install ndenv
$ exec $SHELL -l
$ ndenv install ${version}

rbenvの導入

$ anyenv install rbenv
$ exec $SHELL -l
$ rbenv install ${version}

確認

# ↓のコマンドで打ってこんな感じの表示が出ればOK
$ anyenv versions
ndenv:
* v11.5.0 (set by hoge/.anyenv/envs/ndenv/version)
rbenv:
  system
* 2.5.1 (set by hoge/.anyenv/envs/rbenv/version)
# 念の為書くモジュールのバージョンも確認
$ ruby -v
$ node -v

自分のやった作業としては以上ですね。

0
0
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
0
0