http://rvm.beginrescueend.com/rvm/install/の適当訳

install

rvmを利用、インストールには2つの方法がある。

  • ユーザとして
  • rootとして(この場合、あなた自身がなにをしようとしているか詳細に知っておく必要がある)

githubからインストール(お勧め)

mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone git://github.com/wayneeseguin/rvm.git && cd rvm && ./install

ファイアーウォールなどのせいでgitのポートが開いてない場合

mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone http://github.com/wayneeseguin/rvm.git && cd rvm && ./install

source tar ballからインストール

version=$(curl http://rvm.beginrescueend.com/releases/stable-version.txt) ;
mkdir -p ~/.rvm/src/ && curl -O http://rvm.beginrescueend.com/releases/rvm-${version}.tar.gz | tar zxf - && cd rvm-${version} && ./install

gemからインストール

∴ gem install rvm            # Install the rvm gem
∴ rvm-install                # Install rvm, adds hooks for bash & zsh
# 初回のみ:for profile in .bash_profile .bashrc ; do echo 'if [[ -s "$HOME/.rvm/scripts/rvm" ]]  ; then source "$HOME/.rvm/scripts/rvm" ; fi' >> ~/.$profile fisource ~/.rvm/scripts/rvm  # load the new code into your current shell and start using rvm ! w00t!

If rvm-install is not found it is likely because your users gem home is not in your path. You can add it to your path by putting this in your ~/.bashrc & ~/.bash_profile For example my system ruby installs gems to ~/.gem/ruby/1.8 so I would do:

gemでインストールしたコマンド類のパスがPATH環境変数に入ってない場合は、PATH環境変数に そのパスをいれてから、rvm-installを実行してください。

export PATH="$PATH:~/.gem/ruby/1.8/bin"
rvm-install

Bootstrap Script

#!/usr/bin/env bash
 
# Install git
mkdir -p $HOME/.rvm/src && cd $HOME/.rvm/src && package = git && version=1.6.5.3
curl -O http://kernel.org/pub/software/scm/git/$package-$version.tar.gz
cd $package-$version && ./configure --prefix=/usr/local && make && sudo make install
 
# Install rvm
cd $HOME/.rvm/src && git clone git://github.com/wayneeseguin/rvm.git && cd rvm && ./install
 
# Install common rubies
source $HOME/.rvm/scripts/rvm
rvm install 1.8.6,1.8.7,ree,1.9.1,jruby,rbx

まずgitを/usr/localにインストールしてるので、かなり危険な気がする。要注意かと…。

Note & Warning

  • Do NOT 'return' from inside the .bashrc file or else rvm will be prevented from working properly.
    • .bashrcの内部でreturnしないでください。rvmが正常に動かなくなります。
  • Be sure that scripts/rvm is sourced at the end of your profiles, after any PATH or other environmental settings.
    • scripts/rvmは、bashrcなどのプロファイルの最後で読み込んでください。
ruby/rvm/install.txt · 最終更新: 2010/02/23 22:13 by fistfvck