Three ways to install Ruby in Ubuntu system
Chszs, reprint need to indicate. Blog home:Http://blog.csdn.net/chszs
Ruby is an open-source, dynamic programming language that has a graceful syntax for building scalable Web applications. Ruby Gems is a great way to enhance the development efficiency of ruby developers.
There are several ways to install Ruby on an Ubuntu system, each of which can be done in just a few steps.
Method One: Install with Apt-get
You can complete the installation of Ruby directly with two commands.
# sudo apt-get update
# sudo apt-get install ruby
Or
# sudo apt-get install ruby2.0
Method two: Using Brightbox PPA Warehouse Installation
# sudo apt-get install python-software-properties
# sudo apt-add-repository ppa:brightbox/ruby-ng
# sudo apt-get update
# sudo apt-get install ruby2.1 Ruby2.1-dev
Method Three: Install with RVM
RVM is the version Manager tool for Ruby.
1, installation RVM
# sudo Apt-get Curl
# curl-l Https://get.rvm.io | Bash-s Stable
# source ~/.RVM/SCRIPTS/RVM
2, the installation of RVM environmental dependence
# RVM Requirements
3. Install Ruby
# RVM Install Ruby
If you want to install multiple versions of Ruby on Ubuntu, you can use the following command to specify RVM as the default Ruby version management.
# RVM Use Ruby--default
Check the currently successfully installed Ruby version
# ruby-v
Installing Gems
# Gem List
# gem install [gem-name]
Like Gem-name can write sass.
If you want to install gems locally, the command is as follows:
# gem Install--local [path of gem file]
You can use the command to update an installed GEMS command as follows:
# Gem Update--system
Or
# Gem Update
Three ways to install Ruby in Ubuntu system