Usually we are, through their own www.ruby-lang.org from the download source and compile and install ruby to bypass this problem, and its own compiler can also be marked with a variety of patches, such as this (settlement of ruby memory leak patch release of the Super啦)
But the ruby compiler own pkg-config should not be identifiable, debian / ubuntu systems, some packages are dependent on the ruby package, the installation of these packages will be asked to install the ruby package, so that the system will have two (or more) ruby, In most cases this is not the problem. But some script at the beginning instead of using env to get ruby instead hardcode # / usr / bin / ruby, this time there is a problem.
debian / ubuntu apt-get to the ruby (v1.8.7.72) because there will be performance issues (slow 50%), because the warehouses are the debug version, which dragged down with a lot of debugging code performance, we can remove the debug symbol recompile deb package to solve the problem.
1) ready to rely on the compiler package:
sudo apt-get build-dep ruby1.8
2) to obtain source deb package:
mkdir-p ~ / build & & cd ~ / build
apt-get source ruby1.8
3) Revise the compiler parameters:
cd ~ / build/ruby1.8-1.8.7.72/debian
Modify rule file, remove the CFLAGS in the "-g"
4) Compile:
cd ~ / build/ruby1.8-1.8.7.72 & & debuild-uc-us
5) Installation:
cd ~ / build & & sudo dpkg-i *. deb
If you make other patches (such as patches MBARI), can step in at between 3 and 4.
In this way, the system only had a local compiler optimization of ruby, all the ruby package will benefit.







