Installing Ruby in Ubuntu 8.04


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:
libruby1.8 ruby1.8
Suggested packages:
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 1.8.6.111-2ubuntu1 [1385kB]
Get:2 http://in.archive.ubuntu.com hardy/main ruby1.8 1.8.6.111-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_1.8.6.111-2ubuntu1_i386.deb) ...
Selecting previously deselected package ruby1.8.
Unpacking ruby1.8 (from .../ruby1.8_1.8.6.111-2ubuntu1_i386.deb) ...
Selecting previously deselected package ruby.
Unpacking ruby (from .../apt/archives/ruby_4.1_all.deb) ...
Setting up libruby1.8 (1.8.6.111-2ubuntu1) ...

Setting up ruby1.8 (1.8.6.111-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
Hello Ruby
amoal@amoal-desktop:~/rubyprogs$

Advertisements

About Amol

I'm blogger, avid read, photographer and book lover. Reading a lot of good stuff and sharing it with the world are my passions.
This entry was posted in Linux, Open Source, Tricks and Tips., Ubuntu, Uncategorized and tagged , , . Bookmark the permalink.

4 Responses to Installing Ruby in Ubuntu 8.04

  1. pR@tz says:

    Linux is just the name of the Kernel… the name of the whole OS is GNU/Linux … 🙂

  2. Amol says:

    You are right man. It should be spelled as GNU/Linux. I am making the changes accordingly. Thanks.

  3. Acuteness says:

    Somehow i missed the point. Probably lost in translation 🙂 Anyway … nice blog to visit.

    cheers, Acuteness.

  4. Bruno Moura says:

    First I apologize my poor English.

    After to install the ruby 1.8.7 patch level 22 from the source
    on ubuntu 8.04 hardy succefully.

    Then I tryed to install rubygems 1.2 in sequence and I
    received this error message:

    xyz@xyz: /usr/local/src/rubygems-1.2.0$ sudo ruby setup.rb
    /lib/rubygems/spec_fetcher.rb:1:in `require’: no such file to load —
    zlib (LoadError)

    So I tried install zlib1g and zlib1g-dev and after this the problem has not fixed

    And I didn’t unistall ruby for reinstall and recompile…

    I tried many kind of commands like for uninstall and re-compile ruby:

    sudo apt-get remove ruby libruby libruby1.8 ruby1.8 irb rdoc ri
    sudo aptitude remove ruby
    sudo dpkg –list | grep ruby, dpkg -r
    and through Synaptic too

    And when I invoke ruby -v or irb, these commands works normally…

    How Can I fix this problem?

    Thank’s so much for help me!

    Bruno

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s