install ruby latest version on ubuntu

download dependencies compiling ruby

sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate

delete old ruby version

sudo apt-get remove ruby1.8

download ruby sourcecode

mkdir /tmp/ruby && cd /tmp/ruby
curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p481.tar.gz | tar xz

compile and install ruby2.0

cd ruby-2.0.0-p481
./configure --disable-install-rdoc
make
sudo make install
sudo ln -s /usr/local/bin/ruby /usr/bin/ruby
$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-linux]

reference

https://github.com/gitlabhq/gitlabhq/blob/6-9-stable/doc/install/installation.md

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章