Sunday, August 8, 2010

Installing Ruby on Ubuntu 10.04

I installed Ruby (default to 1.8) and Ruby 1.9.1 using Synaptic Package Manager.
I needed just two steps:
(a) Turn on 2 check boxes (Ruby and Ruby1.9.1) and
(b) click the Apply button.
That's all I needed to do to install Ruby with two versions.

And, here is the result:

$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
$ ruby1.9.1 -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux]
$ ruby -e 'puts $:'

Similarly, I installed rubygems (1.8 and 1.9.1).
Go to the Synaptic Package Manaager and
(a) check mark rubygems1.8 and rubygems1.9.1 and
(b) apply the change.

And here is the result:

$ gem -v
$ gem1.9.1 -v

$ gem list --local

*** LOCAL GEMS ***

$ gem1.9.1 list --local

*** LOCAL GEMS ***

No gems installed at this point.

Interestingly, irb was not installed, but irb1.91. was.
I had to install irb as follows:

$ sudo apt-get install irb

No comments:

Post a Comment