LoginSignup
6
5

More than 3 years have passed since last update.

#Gentoo Linuxに #rbenv インストールするときのメモ

Last updated at Posted at 2014-03-31

Gentoo Linuxにrbenv入れる手順をよく忘れるのでメモ。


libs

  • libyaml
# emerge -pqv libyaml
[ebuild   R   ] dev-libs/libyaml-0.1.6  USE="-doc -examples -static-libs {-test}" 
  • libiconv
# emerge -pqv libiconv

rbenv

普通に。

$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

rbenv install

/tmpnoexec付きでmountされているとこんな感じにコケるので、

# mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)

TMPDIR環境変数に別のディレクトリを指定する。

$ mkdir -p tmp
$ TMPDIR="${PWD}/tmp" rbenv install 2.1.1

bundler

$ rbenv shell 2.1.1
$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
$ which ruby
${HOME}/.rbenv/shims/ruby
$ gem install --no-ri --no-rdoc bundler
Fetching: bundler-1.6.0.gem (100%)
Successfully installed bundler-1.6.0
1 gem installed
6
5
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
5