LoginSignup
36
33

More than 5 years have passed since last update.

rbenvでRubyの環境を作る

Posted at

rbenv、ruby-buildのインストール

$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
$ mkdir -p ~/.rbenv/plugins
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

パスを通す

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
$ echo 'eval "$(rbenv init -)"' >> ~/.profile
$ exec $SHELL -l

インストール可能なrubyのバージョンを表示

$ rbenv install -l

指定したバージョンをインストール

$ rbenv install 2.0.0-p247
$ rbenv rehash
$ rbenv global 2.0.0-p247

Bundlerのインストール

$ rbenv exec gem install bundler
$ rbenv rehash
36
33
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
36
33