Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

rbenvでRuby自体のVersion管理をする

Last updated at Posted at 2020-08-05

これは何?

Rubyのインストール時にVersion管理ツール経由でインストールするときのメモです。Ubuntuでのインストールで説明しています。

手順

rbenvをインストールする

$ sudo apt-get update
$ cd
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
$ source ~/.bashrc

Rubyをインストール

好みのVersionを指定してインストールして、そのVersionを使うように指定する。

$ rbenv install -l
$ rbenv install 2.7.1
$ rbenv global 2.3.1

bundlerをインストールする

$ gem install bundler
$ rbenv rehash

bundleのパッケージをインストールする

$ bundle install
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?