天天看點

Install Ruby and gem

1. Install yaml

sudo apt-get install libyaml-0-2 libyaml-dev  

2. Install Ruby

Download ruby-1.8.7-p358.tar.gz and ruby-1.9.3-p429 from ftp://ftp.ruby-lang.org/pub/ruby/

$tar -xvzf ruby-1.8.7-p358.tar.gz

$su

#./configure -prefix=/usr/local/ruby-1.8.7

#make && make install #export PATH=/usr/local/ruby-1.8.7/bin: $PATH

For ruby-1.9.3-p429 ,use the same commands with ruby-1.8.7-p358.tar.gz

rm -rf /usr/local/ruby-1.8.7

ruby -v     3. Install gem   download gem from http://rubyforge.org/frs/?group_id=126 ruby setup.rb

繼續閱讀