tutorial on installing Ruby interpreter on operating system _ruby topics

Source: Internet
Author: User

Ruby Installation-Linux
The following is a list of steps to install Ruby on a Linux machine.
Note: Before installing, make sure you have root permissions.
SOURCE Installation
Download the latest version of the Ruby zip file. Please click here to download.
After you download Ruby, unzip to the newly created directory:

$ TAR-XVZF ruby-2.2.3.tgz  
$ cd ruby-2.2.3


Now, configure and compile the source code as follows:

$./configure
$ make
$ sudo make install


After installation, make sure everything works by entering the following command at the command line:

$ruby-v
Ruby 2.2.3 ...


If all works correctly, the version of the installed Ruby interpreter will be output, as shown above. If you have another version installed, a different version is displayed.
Automatically install Ruby
If your computer is already connected to the Internet, the easiest way to install Ruby is to use Yum or apt-get. You can install Ruby on your computer by entering the following command at the command prompt.

$ sudo yum install ruby  # CentOS, Fedora, or RHEL system

Or

sudo apt-get install Ruby-full # Debian or Ubuntu system


If you are an Apple system, you can use the Brew command to install:

$ Brew Install Ruby

Ruby Installation-Windows
The following is a list of steps to install Ruby on a Windows machine.
Note: When installing, you may have different versions available.

    • Window system, we can use Rubyinstaller to install Ruby environment, download the address: please click here to download.
    • After downloading the Rubyinstaller, unzip to the newly created directory:
    • Double-click the Rubyinstaller-2.2.3.exe file to start the Ruby Setup Wizard.
    • Click Next to continue with the wizard, and remember to check ADD Ruby executables to your PATH until Ruby Setup completes Ruby Setup.

If your installation does not properly configure environment variables, then you may need to configure the environment variables.

    • If you are using Windows 9x, add in your c:\autoexec.bat: Set path= d:\ (Ruby installation directory) \bin;%path%
    • Windows nt/2000 users need to modify the registry.
    • Click on Control Panel | system Performance | environment variable.
    • Under the system variable, select Path and click EDIT.
    • Add a Ruby directory at the end of the list of variable values and click OK.
    • Under the system variable, select Pathext and click EDIT.
    • Add to. RB and. RBW to the list of variable values and click OK.

After installation, make sure everything works by entering the following command at the command line:

$ruby-V
Ruby 2.2.3


If all works correctly, the version of the installed Ruby interpreter will be output, as shown above. If you have another version installed, a different version is displayed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.