chaoqun said:
I konw that the last ruby patch is level 111, but when I use apt-get
install ruby I installed ruby1.8 patch level 36.
How can I upgrade it to level 111?
Thanks.
Pre-built packages are almost always going to be more-or-less backlevel.
That's just the nature of things. If you want to be on the bleeding edge
then you have to build it yourself.
(Unless you're running into a specific problem with p36 that is fixed in
p111, why bother? I have a rule about updating working code, and that
rule is "don't".)
However, assuming you need p111 for some reason, or you just want to
start building Ruby for yourself so you can stay up to date, the easiest
way to do so is to uninstall the version of Ruby you installed via
apt-get, along with any other Ruby-related packages such as rubygems,
irb, ri, or rdoc, then download the Ruby tarball and build it from scratch.
If you haven't done so already, you'll need to apt-get install
build-essential so you'll have the compiler, etc. Read the README file
in the Ruby tarball for instructions on how to build Ruby.
When you run Ruby's configure command, use the --enable-install-doc
option to get the rdoc indexes built.
/configure --enable-install-doc
make
sudo make install
After installing Ruby, get the RubyGems tarball from the RubyGems
project page on RubyForge. Unzip and untar the tarball and run
sudo ruby setup.rb
to install it. (See
http://docs.rubygems.org/read/chapter/3#page13 for
more info.)