Ruby: Build a Ruby environment in Linux

Source: Internet
Author: User

Ruby: Build a Ruby environment in Linux

Ruby Learning Experience: Build a Ruby environment in Linux
1. Preface
2. Install the Ruby environment in Linux

 

I. Preface

This blog post records the establishment of the Ruby programming environment in Linux.

This article is based on the following:
Http://www.cnblogs.com/xfiver/archive/2012/03/08/2385833.html (linux ruby installation "ubuntu10.10 ])
Http://www.360doc.com/content/07/0131/17/4910_351421.shtml (Ruby installation on Linux)

 

Ii. Install the Ruby environment in Linux

1. Official download Ruby package: http://www.ruby-lang.org/en/downloads/

 

2. Install Ruby
Assume that you have installed it to/usr/Ruby-2.3.
The command is as follows:

Sudo tar-zxvf ruby-2.3.1.tar.gz
Cd ruby-2.3.1
Sudo./configure -- prefix =/usr/Ruby-2.3
Sudo make
Sudo make install

 

3. Configure Environment Variables
Open the/etc/profile file
Add the following code:

# Set Ruby environment
Export RUBY_HOME =/usr/Ruby-2.3
Export PATH = $ PATH: $ RUBY_HOME/bin

 

4. Verify Installation
Ruby-v
Check whether version information 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.