Pertama-tama, instal pustaka prasyarat:
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
Kemudian instal rbenv, yang digunakan untuk menginstal Ruby:
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.3.1
rbenv global 2.3.1
ruby -v
Kemudian (opsional) beri tahu Rubygems untuk tidak menginstal dokumentasi lokal:
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
Penghargaan: https://gorails.com/setup/ubuntu/14.10
Peringatan!!!
Ada masalah dengan Gnome-Shell
. Lihat komentar di bawah.
sudo