On 10-09-23 04:57 PM, Tanawat Limungkura wrote:
> I'm very sorry that ask several silly questions.But I'm actually very
> new for ruby and linux. So please answer my question
>          I try to install ruby on Ubuntu with command
>          apt-get install ruby1.9.1-full
>          The process is completed.But I cant use ruby command just like
> ruby -v
>          So I try   apt-get install ruby It's work.But when I check
> version of ruby It's 1.8.7. How I upgrade ruby to latest version on
> linux ? Please help me
>

you could simply build it from source, it's not that hard!

step 1) make sure you got everything you need to compile and build

sudo aptitude install build-essential make
sudo aptitude install libc6-dev libssl-dev
sudo aptitude install libreadline6-dev zlib1g-dev

step 2) get the current release ruby1.9.2-p0

wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p0.tar.gz

step 3) extract the source files

tar xvzf ruby-1.9.2-p0.tar.gz

step 4) build ruby, these steps will install ruby under 
"/usr/local/bin/ruby"

cd ruby-1.9.2-p0/
./configure
make
make test
sudo make install

ruby -v

rubygems is now a part of ruby so you can also type

gem -v

-- 
Kind Regards,
Rajinder Yadav