Source Code Compilation Installation ruby-2.2
1, access to source packages;
wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz
2. Install dependent packages
sudo apt-get install-y build-essential OpenSSL curl libcurl3-dev libreadline6 libreadline6-dev git zlib1g zlib1g-dev Libs Sl-dev libyaml-dev libxml2-dev libxslt-dev autoconf automake libtool imagemagick libmagickwand-dev Libpcre3-dev Libsqlite3-dev
3. Decompression
TAR-ZXVF ruby-2.2.2.tar.gz-c.
4. Enter the source package
CD ruby-2.2.2
5. New Installation directory
Mkdir/urs/local/ruby
6. Compiling
./configure-prefix=/usr/local/ruby
7. Installation
sudo make && sudo make install
8. Configure the system environment variables
sudo vim/etc/environment
Add after path:/urs/local/ruby/bin
Source/etc/environmet
9. Testing
Ruby--version
Ruby 2.2.2p95 (2015-04-13 revision 50295) [X86_64-linux]
Ubuntu 14.10 Compilation Install Ruby