Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-03-2008, 04:31 AM   #1
Registered: Oct 2008
Posts: 54

Rep: Reputation: 15
Installing Ruby on Linux

The following are the steps that I performed to install ruby on my linux
machine. This same text is also available on

I went to There I found out a
section with the heading Ruby Source Code

I pick the url of the link for the file using the right click and
choosing the 'copy link location' in my firefox.

Then I went to the shell on my linux and put the following command

shell> wget

This downloaded the ruby source code to my root directory. I extracted
the file using the following command

shell> tar -xvf ruby-1.8.7-p72.tar.gz

This command extracted the source archieve to ruby-1.8.7-p72 directory.
Then I enter into this ruby-1.8.7-p72 directory and executed the
following command

shell> ./configure

This is actually not a command rather a script, that is run to check the
required configurations for the installation purposes. At the successful
run of this script I executed the following command

shell> make

This make command compiled the code. At the end of the make command I
executed the following command

shell> make install

This make install command installed the ruby and placed the ruby files
in appropriate folders.

Thats all to what I did for installing ruby on a linux machine.

You can confirm your ruby installation by using the following command

shell> ruby -v
Old 10-03-2008, 04:44 AM   #2
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
You do know you could have just used your Package Manager? If you are using one of the buntu's from the terminal sudo apt-get install ruby
Old 10-03-2008, 05:09 AM   #3
Registered: Oct 2008
Posts: 54

Original Poster
Rep: Reputation: 15
But I am not running Ubunto. I think this apt is available for Debian flavors. Can you give me a command to check my flavor for the operating system? Thanks
Old 10-03-2008, 05:15 AM   #4
LQ 5k Club
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.2
Posts: 7,802
Blog Entries: 58

Rep: Reputation: Disabled
Whatever distro you're using, Ruby will be available without compiling it yourself.
Old 10-03-2008, 05:49 AM   #5
Registered: Oct 2008
Posts: 54

Original Poster
Rep: Reputation: 15
In fact I have my system at some data center. I ran ruby command which gave me unknown command message, therefore I get on to installing it myself. Thanks

My system is this

Linux version 2.6.21-1.3194.fc7
Old 03-04-2009, 12:47 AM   #6
Registered: Apr 2008
Posts: 47

Rep: Reputation: 15
I wanted to download ruby for Redhat Linux. But there is no tar file avaiable on this link anymore...
Old 03-04-2009, 03:04 AM   #7
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Learn how to use your disto's package manager. Every linux distro will have Ruby packages pre-built for your system.
Old 03-04-2009, 09:56 AM   #8
Registered: Jun 2005
Posts: 202

Rep: Reputation: 37
If everything went well terminal should read:

[root@localhost ruby-1.8.7-p72]#./ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]

Using a live CD pclos
Though, synaptic package manager is way easier

Last edited by whk; 03-04-2009 at 01:45 PM.
Old 09-07-2010, 12:45 PM   #9
LQ Newbie
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
Installing from the package manager is all well and good as long as it has recent packages. Since RHEL 5's latest Ruby is 1.8.5 it's pretty near impossible to use any of the current gems with it. So it's useful to be able to install from source; though if you're using RHEL you probably don't want to do that anyway... use Fedora. Wouldn't be surprised if the same thing were a problem on stable Debian.


apt, debian, install, linux, ruby

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem installing ruby on rails kathmanduite Linux - Software 6 09-27-2012 06:59 AM
Installing Ruby on RHEL 4 64bit Neruocomp Linux - Software 2 09-26-2012 05:43 PM
Ruby SDL/ Ruby OpenGL tutorials/reference? LinuxNoob75 Programming 0 12-30-2007 12:47 PM
Runtime Error Installing Ruby 1.8.5 Muraii Linux - Software 2 01-16-2007 07:19 PM
[Ruby] Installing FileUtils Module lmcilwain Programming 1 01-16-2007 03:12 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration