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