Ruby is an open source dynamic programming language that has beautiful syntax for building scalable Web applications. Ruby Gems can be a good way to improve the development efficiency of ruby developers.
There are several ways to install Ruby on an Ubuntu system, and each method takes only a few steps to get it done.
Method One: Use Apt-get installation
You can complete the installation of Ruby using two commands directly.
# sudo apt-get update
# sudo apt-get install ruby
Or
# sudo apt-get install ruby2.0
Method Two: Use 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: Use RVM installation
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
3. Install Ruby
If you want to install more than one Ruby version on Ubuntu, you can use the following command to specify the use of RVM as the default Ruby version management.
Check the version of Ruby that is currently successfully installed
Install Gems
# Gem List
# gem install [gem-name]
Like Gem-name can write sass.
If you want to install gems locally, the commands are as follows:
# gem Install--local [path of gem file]
You can use the command to update installed gems, as follows:
Or
Original link: http://blog.csdn.net/chszs/article/details/42462517
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.