Ruby Learning tips for building a ruby environment under Linux
1. Preface
2.Linux Installing the ruby Environment
First, preface
This blog post records the construction of the Ruby programming environment under Linux.
This article is based on the following articles:
Http://www.cnblogs.com/xfiver/archive/2012/03/08/2385833.html (Linux under Ruby Install "ubuntu10.10")
Http://www.360doc.com/content/07/0131/17/4910_351421.shtml (Ruby installation on Linux)
Second, Linux installed under the ruby environment
1. Official Download Ruby Compression pack: http://www.ruby-lang.org/en/downloads/
2. Install Ruby
Assuming installation to/usr/ruby/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/ruby-2.3
sudo make
sudo make install
3. Configure Environment variables
Open/etc/profile File
Add the following code:
# Set Ruby Environment
Export ruby_home=/usr/ruby/ruby-2.3
Export path= $PATH: $RUBY _home/bin
4. Verifying the installation
Ruby-v
Check if version information is displayed
Ruby Learning tips for building a ruby environment under Linux