ユーザ用ツール

文書の過去の版を表示しています。


xxenv

概要

xxenvはrbenv、pyenv、およびgoenvのように、インタプリタ言語バージョンをユーザレベルで管理するツールのことである。 言語ごとに、インスタンスがあるが、おおむね同じようなインターフェイスを持つ。

xxenv

rbenv

概要

Rubyの実行環境を管理するツールである。

インストール

パッケージなどもあるが、ruby-buildが古いとせっかく rbenvでバージョン管理していても、新しいバージョンをインストールできないので、gitから直接取得する。

$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ mkdir ~/.rbenv/plugins
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ git clone https://github.com/rbenv/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems
$ echo bundler > ~/.rbenv/default-gems
$ echo byebug >> ~/.rbenv/default-gems

また、以下の設定を ~/.bashrc に対しても行う。

if [ -d ${HOME}/.rbenv ]; then
  export RBENV_ROOT=${HOME}/.rbenv
  export PATH=${RBENV_ROOT}/bin:${RBENV_ROOT}/shims:${PATH}
  export RBENV_SHELL=bash
  eval "$(rbenv init -)"
fi

ログインしなおすか、

$ . ~/.bashrc

するかしたのちに、rubyをインストールして、そのバージョンをデフォルトにする。

$ rbenv install 3.0.0
$ rbenv global 3.0.0

pyenv

概要

pyenvは pythonのバージョンを管理する。

インストール

goenv

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information