Computer can not understand our language. We have to make programming in the language of computer. There are many computer languages like Java, Oracle, C++, HTML and Ruby etc. but the simplest one is RUBY. It is very easy to be aware of its way. On the other hand, it is an influential language and is used professionally.
We have given different names to the written language of computer and human being. The printed language of computer is called ‘code’ and human language is called ‘text’.
INSTALLATION OF RUBY:
It is very easy to install Ruby. The first thing is to get Ruby installer. It’s better to use the latest version of the language. Here, we are going to use 1.8.4 version. Now, the next task is to install the language. You have to mention the location of installation.
After installation, we have to write a program. For this purpose, text editor is used. The Ruby has SciTE as text editor. In order to use colorful text, get these files from internet and save them in folder SciTE.
• Global Properties
• Ruby Properties
In order to get access to command line, go to start menu, Accessories and choose Command Prompt. It is better to save your program in a separate folder. If you write the command cd .., it will move you one folder above. The command cd foldername will give access to folder whose name is foldername. If you want to look at all the saved folder in the folder you are currently using then the command dir /ad is used.
The beginners of Ruby should use Mac OS X 10.2 as it is uncomplicated. For making and execution of a program, you have to use text editor and command line. If your choice is text edit then you can only store program in the form of text. There are some other choices also like vi, pico, and emacs etc. we can get access to these by command line.
The first thing is get to know whether you have installed Ruby or not? For this purpose, you have to write which ruby. In case, the result is /usr/bin/which: no ruby in (…), it means that you have to install it again. In case, you do not know the version of your Ruby then you have to type ruby -v.
If you have to install the Ruby then download it first. In case, the file name is ‘ruby-1.6.7.tar.gz’, the file will get opened with tar zxvf ruby-1.6.7.tar.gz
Now, you have to configure the process of installation by giving command. /configure –prefix=$HOME). After this command, write make. The last command will provide you an interpreter. After this, write make install for installation.
In order to check your installation, again write ruby –v. Now, you have to turn towards real programming.