The ruby1.8.6patchlevel produced by apt-getinstall is 36. It seems that if you want to install the latest version in Ubuntujeos7.10, it is easier to have One-ClickRubyInstaller in windows. I installed it from the source and found that many existing tutorials are scattered. The installation process is as follows: 0-install the build tool sudoaptitudeinsta
The patch level of ruby1.8.6 installed by apt-get is 36. It seems that if you want to install the latest version in Ubuntu jeos 7.10, it is better to have One-Click Ruby Installer in windows.
I installed it from the source and found that many of the existing tutorials are scattered.
The installation process is as follows:
0-install the build tool
Sudo aptitude install build-essential linux-headers-$ (uname-r)
1-install readline
Wget ftp://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
Tar xzvf readline-5.2.tar.gz
Cd readline-5.2
./Configure
Make
Sudo make install
2-install ruby
Wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz
Tar xvfz ruby-1.8.6-p111.tar.gz
Cd ruby-1.8.6-p111
./Configure
Make
Sudo make install
Sudo make install-doc
[Note: After the above installation, ruby will be installed in/usr/local/bin/. This directory is in ubuntu path and can be directly used]
Verify the installation of ruby-v, which is shown:
Ruby 1.8.6 (patchlevel 111) [i686-linux]
In addition, you can run the which ruby command to view the ruby installation location.
3-install gem
Wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz
Tar xzvf rubygems-1.0.1.tgz
Cd rubygems-1.0.1
Sudo ruby setup. rb
4-install zlib, which is required by gem
First install the zlib1g development kit:
Sudo apt-get install zlib1g-dev
Then download zlibruby
Zlib Homepage
Http://raa.ruby-lang.org/project/ruby-zlib/
Http://www.blue.sky.or.jp/atelier/ruby/ruby-zlib-0.6.0.tar.gz
The installation command is as follows:
Wget http://www.blue.sky.or.jp/atelier/ruby/ruby-zlib-0.6.0.tar.gz
Cd ruby-zlib-0.6.0
Ruby extconf. rb
Make
Make install
5. Verify gem installation and upgrade
Sudo gem update -- system
You can also install rails to verify whether the installation is successful.
Sudo gem install rails -- include-dependencies