Rubyのバージョンを管理できるrbenvでRubyをシステムワイドに(/usr/local/に)インストールする方法です(Amazon Linuxの場合)。
yum install gcc readline-devel openssl-devel zlib-devel gdbm-devel libffi-devel git make cd /usr/local git clone git://github.com/sstephenson/rbenv.git rbenv mkdir rbenv/{shims,versions} mkdir /usr/local/rbenv/plugins cd /usr/local/rbenv/plugins git clone git://github.com/sstephenson/ruby-build.git cd ruby-build ./install.sh echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/bashrc echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/bashrc echo 'eval "$(rbenv init -)"' >> /etc/bashrc source ~/.bashrc rbenv install 2.1.2 rbenv global 2.1.2