Today I have started learning ruby and was really curious of how to install it on GNU/linux as I am newly wed with Ubuntu. Recently I divorced with Fedora and decided to happily live with Ubuntu.
So I can’t believe that it may be so simple.
Just one command sudo apt-get install ruby
And if your repository settings are upto date and if your system is well configured then here it goes.
It took just one minute to configure everything
Here is console output.
amoal@amoal-desktop:~$ sudo apt-get install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ruby1.8-examples rdoc1.8 ri1.8
The following NEW packages will be installed:
libruby1.8 ruby ruby1.8
0 upgraded, 3 newly installed, 0 to remove and 464 not upgraded.
Need to get 1430kB of archives.
After this operation, 5997kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://in.archive.ubuntu.com hardy/main libruby1.8 188.8.131.52-2ubuntu1 [1385kB]
Get:2 http://in.archive.ubuntu.com hardy/main ruby1.8 184.108.40.206-2ubuntu1 [24.9kB]
Get:3 http://in.archive.ubuntu.com hardy/main ruby 4.1 [20.7kB]
Fetched 1430kB in 34s (41.5kB/s)
Selecting previously deselected package libruby1.8.
(Reading database ... 94985 files and directories currently installed.)
Unpacking libruby1.8 (from .../libruby1.8_220.127.116.11-2ubuntu1_i386.deb) ...
Selecting previously deselected package ruby1.8.
Unpacking ruby1.8 (from .../ruby1.8_18.104.22.168-2ubuntu1_i386.deb) ...
Selecting previously deselected package ruby.
Unpacking ruby (from .../apt/archives/ruby_4.1_all.deb) ...
Setting up libruby1.8 (22.214.171.124-2ubuntu1) ...
Setting up ruby1.8 (126.96.36.199-2ubuntu1) ...
Setting up ruby (4.1) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
And here my Ruby is cooked with all the flavors in it.
And I am just ready to dance with Ruby
amoal@amoal-desktop:~$ mkdir rubyprogs
amoal@amoal-desktop:~$ cd rubyprogs/
amoal@amoal-desktop:~/rubyprogs$ vim hello.rb
amoal@amoal-desktop:~/rubyprogs$ ruby hello.rb