LoginSignup
6
8

More than 5 years have passed since last update.

Raspberry Piでrbenvを使ってRubyをインストールする

Last updated at Posted at 2015-07-26

rbenv

pi
$ cd /opt/src
$ git clone https://github.com/rbenv/rbenv.git
$ sudoedit /etc/profile.d/rbenv.sh
/etc/profile.d/rbenv.sh
export RBENV_ROOT=/opt/src/rbenv
export PATH="$RBENV_ROOT/bin:$PATH"
eval "$(rbenv init -)"
pi
$ source /etc/profile.d/rbenv.sh

ruby-build

pi
$ mkdir /opt/src/rbenv/plugins
$ cd /opt/src/rbenv/plugins
$ git clone git://github.com/sstephenson/ruby-build.git
$ cd /opt/src/rbenv/plugins/ruby-build
$ sudo ./install.sh

rbenv-gemset

pi
$ cd /opt/src/rbenv/plugins
$ git clone git://github.com/jamis/rbenv-gemset.git

rbenv-binstubs

pi
$ cd /opt/src/rbenv/plugins
$ git clone https://github.com/ianheggie/rbenv-binstubs.git

Ruby

pi
$ sudo apt-get install -y libreadline-dev
$ rbenv install 2.4.0
$ rbenv rehash
$ rbenv global 2.4.0
6
8
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
6
8