Created
November 11, 2015 07:49
-
-
Save rupakraj/da8f1b7f47787a80f44f to your computer and use it in GitHub Desktop.
Installing and Updating the Ruby on Ubuntu 10.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First of all, install the prerequisite libraries: | |
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 | |
Then install rbenv, which is used to install Ruby: | |
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
exec $SHELL | |
rbenv install 2.2.0 | |
rbenv global 2.2.0 | |
ruby -v | |
Then (optional) tell Rubygems to not install local documentation: | |
echo "gem: --no-ri --no-rdoc" > ~/.gemrc | |
Credits: https://gorails.com/setup/ubuntu/14.10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment