On Linux or Unix:
Here are the steps to be followed to install Ruby on a Unix/Linux machine:NOTE: Before proceeding, make sure you have root privilege.
- Download a zipped file having latest version of Ruby. Follow Download Link.
- 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]
- If everything is fine, this should output the version of the installed Ruby interpreter as shown above. You may have installed different version, so it will display a different version.
Using yum to install Ruby:
sudo apt-get install yum
$ yum install ruby
On Windows :
Here are the steps to install Ruby on a Windows machine.
NOTE: You may have different version available at the time of installation.
- Download a zipped file having latest version of Ruby. Follow Download Link.
- After having downloaded the Ruby archive, unpack it and change into the newly created directory:
- Double-click the Ruby1.6.7.exe file. The Ruby installation wizard starts.Check all the available option.
- Click Next to move to the Important Information page of the wizard and keep moving till Ruby installer completes installing Ruby
Popular Ruby Editors:
To write your Ruby programs, you will need an editor:
- If you are working on Windows machine, then you can use any simple text editor like Notepad or Edit plus.
- VIM (Vi IMproved) is very simple text editor. This is available on almost all Unix machines and now Windows as well. Otherwise, your can use your favorite vi editor to write Ruby programs.
- RubyWin is a Ruby Integrated Development Environment (IDE) for Windows.
- Ruby Development Environment (RDE) is also very good IDE for windows users.
- You can use eclipse and install the ads-on of ruby available.
No comments:
Post a Comment