Install Ruby from source on a different location
Here's an example, installing 2.1.0 from source. The source tarball is available on this link http://www.ruby-lang.org/en/downloads/.
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.gz
tar zxvf ruby-2.1.0.tar.gz
cd ruby-2.1.0
./configure --prefix=/opt/ruby-2.1.0
make
make install
Then, add these 2 lines on ~/.bashrc
or ~/.bash_profile
.
export PATH=/opt/ruby-2.1.0/bin:$PATH
export MANPATH=/opt/ruby-2.1.0/share/man:$MANPATH
Written by Koji Tanaka
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#