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 $:'
/usr/local/lib/site_ruby/1.8
/usr/local/lib/site_ruby/1.8/i486-linux
/usr/local/lib/site_ruby/1.8/i386-linux
/usr/local/lib/site_ruby
/usr/lib/ruby/vendor_ruby/1.8
/usr/lib/ruby/vendor_ruby/1.8/i486-linux
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/1.8
/usr/lib/ruby/1.8/i486-linux
/usr/lib/ruby/1.8/i386-linux



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
1.3.5
$ gem1.9.1 -v
1.3.5

$ 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