As you all know Ruby is one of the most popular programming language on the web. It is recommended to install ruby 1.9.2 instead of 1.8.x
I tried to install ruby from the package manager on Ubuntu, but ruby 1.9.2 is not there in the repo.
So, I am going to show you how to install ruby 1.9.2 on Ubuntu
Step 1 -
Fire up the terminal and execute these few commands -
$ sudo apt-get install build-essential zlib1g zlib1g-dev libruby1.9.1 libxml2 libxml2-dev libxslt1-dev $ sudo apt-get build-dep ruby1.9.1 $ wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2 $ tar xvjf ruby-1.9.2-p0.tar.bz2
Open ruby-1.9.2-p0/ext/Setup and uncomment the zlib line.
Now, simply configure, compile and install it! -
$ ./configure $ make $ sudo make install
AND RUBY 1.9.2 IS INSTALLED!
To check the ruby version -
$ ruby -v => ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
To check the rubygems version -
$ gem -v => 1.3.7
Hope this quick tip will help many Ubuntu users who want to install ruby 1.9.2
Worked for me! Tks a lot!
good instructions, useful post.
thanks for your time.
Eh… THANKS!!!! :D