Ruby - Local Environment Setup in UNIX
📚 tutorials

Ruby - Local Environment Setup in UNIX

1 min read 230 words
1 min read
ShareWhatsAppPost on X
  • 1This tutorial provides a step-by-step guide to setting up a Ruby programming environment on a Unix machine.
  • 2Users need root privileges to install Ruby, which involves downloading, unpacking, configuring, and compiling the source code.
  • 3Alternatively, Ruby can be easily installed using the yum utility if the computer is connected to the Internet.

AI-generated summary · May not capture all nuances

Key Insight
AskGif

"This tutorial provides a step-by-step guide to setting up a Ruby programming environment on a Unix machine."

Ruby - Local Environment Setup in UNIX

If you are still willing to set up your environment for Ruby programming language, then let's proceed. This tutorial will teach you all the important topics related to environment setup. We would recommend you to go through the following topics first and then proceed further −

1. Ruby Installation - Unix :

Here are the steps to be followed to install Ruby on a Unix machine −

NOTE − Before proceeding, make sure you have root privilege.

- Download a zipped file having the latest version of Ruby from https://www.ruby-lang.org/en/downloads/.

- After having downloaded the Ruby archive, unpack it and change into the newly created directory-

$ tar -xvzf ruby-1.6.7.tgz
$ cd ruby-1.6.7

- Now, configure and compile the source code as follows −

$ ./configure
$ make

-Finally, install Ruby interpreter as follows −

$ su -l root # become a root user
$ make install 
$ exit # become the original user again

- After installation, make sure everything is working fine by issuing the following command on the command-line −

$ruby -v
ruby 1.6.7 (2002-06-04) [i386-netbsd]

Using yum to Install Ruby

If your computer is connected to the Internet, then the easiest way to install Ruby or any other RPM is using the yum utility. Give the following command at the command prompt and you will find Ruby gets installed on your computer.

$ yum install ruby

Enjoyed this article?

Share it with someone who'd find it useful.

ShareWhatsAppPost on X

AskGif

Published on 11 May 2020 · 1 min read · 230 words

Part of AskGif Blog · tutorials

You might also like

Ruby - Local Environment Setup in UNIX | AskGif Blog