ubuntu 11.04上升级ruby到1.9版本
#!/bin/bash
sudo apt-get -y install zlib1g-dev libssl-dev libreadline5-dev libyaml-dev build-essential bison checkinstall
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
tar xvzf ruby-1.9.2-p290.tar.gz
cd ruby-1.9.2-p290 www.2cto.com
./configure --prefix=/usr/
--program-suffix=1.9.2/
--with-ruby-version=1.9.2/
--disable-install-doc
make
sudo checkinstall -D -y/
--fstrans=no/
--nodoc/
--pkgname='ruby1.9.2'/
--pkgversion='1.9.2-p290'/
--provides='ruby'/
--requires='libc6,libffi5,libgdbm3,libncurses5,libreadline5,openssl,libyaml-0-2,zlib1g'/
--maintainer=murrain@gmail.com
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.2 500/
--slave /usr/bin/ri ri /usr/bin/ri1.9.2/
--slave /usr/bin/irb irb /usr/bin/irb1.9.2/
--slave /usr/bin/gem gem /usr/bin/gem1.9.2/
--slave /usr/bin/erb erb /usr/bin/erb1.9.2/
--slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.2
摘自:一不小心高潮了